in reply to Re^7: Win32::Process output
in thread Win32::Process output
Thanks, this seems to be a good shell for what I need to do (though I'll probably wear out the Perl book figuring it out). A few questions:
1. What is the purpose of $semSTDOUT ? It looked like the idea was to create a shared handle for file output but does this do that? Is $semSTDOUT a reserved variable for a shared handle (semaphore?) to STDOUT?
2. What does threads->tid do? It seems to just print a '0' for all of the calls
3. If I understand, the "async( \&worker, $Qwork, $Qresults, $TIME ) for 1.. $T; " part sets up 20 separate worker threads as part of a queue, and each worker thread reads names from a queue that is fed names from a 'master thread' that reads the file? Does the queue itself maintain the integrity (i.e. 3 worker threads ask for the next name from the queue, does the queue get locked for each call to prevent duplication?)
Is the outer 'master thread' that feeds the names from the file into the queue strictly necessary?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^9: Win32::Process output
by BrowserUk (Patriarch) on Nov 04, 2010 at 16:46 UTC | |
by tawnos (Novice) on Nov 14, 2010 at 17:11 UTC |