![]() |
|
more useful options | |
PerlMonks |
Re: Re: Threads and object accessby BrowserUk (Patriarch) |
on Dec 12, 2002 at 00:07 UTC ( #219219=note: print w/replies, xml ) | Need Help?? |
One mechanism would be to use signals or semaphores and a shared data buffer. The child thread get its data, puts it into the shared buffer and then signals (semaphores) when it has put something in the buffer to process. (Win32::Semaphore is one possibility, but there is Threads::Semaphore in 5.8, but I am being a luggard and haven't got around to upgrading yet). You don't say what the parent thread is doing, but it would need to check (with timeout if necessary) for the semaphore and then take the appropriate action on behalf of the child. Okay you lot, get your wings on the left, halos on the right. It's one size fits all, and "No!", you can't have a different color.
In Section
Seekers of Perl Wisdom
|
|