in reply to Threaded perl (re: debian bug #203579)
I've now fixed this in bleedperl.use threads; use threads::shared; my $rw = 0; cond_signal $rw;
As regards to the OP's code, I'd recommend avoiding low-level stuff like cond_wait()/cond_signal() where possible; they are very hard to get right and avoid deadlock. For example I suspect from a brief look at the code that there are are multiple race conditions. Instead, use something like Thread::Queue which takes away most of the pain about passing streams of commands or data between threads.
Dave.
|
|---|