At 16:21 -1000 11/27/02, Joshua Hoblitt wrote:
Sure. Can't promise I will deliver, though. But I'd be interested to know what you would like to do with it.Can I start a wish list for forks::shared?
Thread::Semaphore just uses shared variables. The only thing that forks.pm doesn't support yet is the :shared attribute. But it _does_ support shared variables.Support for Thread::Semaphore
Change line 73 in Threads::Semaphore.pm from:
my $val : shared = @_ ? shift : 1;
to:
my $val = @_ ? shift : 1;
share( $val );
Preliminary test indicate to me thath this should work.
Please make sure that you have -use-d forks _and_ forks::shared before using Thread::Semaphore, otherwise Thread::Semaphore will load the original threads::shared, and that _doesn't_ work.
Hope this helps.
Liz
