Wiggins has asked for the wisdom of the Perl Monks concerning the following question:
Having completed my threaded Perl, I now attempted to move it to the destination system. That is, from Knoppix (Perl 5.8.8) to RHEL4 WS (Perl 5.8.5). BOOM!
... use threads (); use threads::shared (); use Thread::Semaphore; ... my $line_semi :shared = new Thread::Semaphore(0); #works in 5.8.8 ... ... sub sendout_sub ($ $) { ... { $line_semi->down(1); # line 309 lock @xlines; $line = shift @xlines; } #implicit unlock; ....
The error in 5.8.5 is:
"Thread failed to start: Can't call method "down" on unblessed reference at line 309."
Did ::Semaphore do the creation of the returned reference incorrectly?
Can I do my own blessing into Semaphore?
Upgrading Thread::Semaphore looks like a complete upgrading to 5.8.8. That would be a politically hard task to get done.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: I lost my "bless"ing.
by jettero (Monsignor) on Dec 20, 2006 at 21:15 UTC | |
by Wiggins (Hermit) on Dec 20, 2006 at 22:41 UTC | |
by jettero (Monsignor) on Dec 21, 2006 at 11:50 UTC | |
|
Re: I lost my "bless"ing.
by ikegami (Patriarch) on Dec 20, 2006 at 23:00 UTC | |
by Wiggins (Hermit) on Dec 22, 2006 at 15:03 UTC | |
|
Re: I lost my "bless"ing.
by diotalevi (Canon) on Dec 20, 2006 at 22:05 UTC | |
|
Re: I lost my "bless"ing.
by zentara (Cardinal) on Dec 21, 2006 at 16:26 UTC |