Think about Loose Coupling | |
PerlMonks |
Re: thread ids stringifying wrong in v5.12.4?by BrowserUk (Patriarch) |
on Dec 14, 2012 at 15:07 UTC ( [id://1008854]=note: print w/replies, xml ) | Need Help?? |
async does not return a "thread id", it returns a blessed thread handle. To get a thread id from a thread handle, use $threadHandle->tid; Thus, there is no perpose in storing your thread handles in a hash -- where they will get stringified -- because you can (and do) obtain those handles from your joinable() sub. Your while loop for joining the threads is horrible -- it obtains the same list over and over. It can be replaced by a simple:
Provided you store your thread handles in the array @threads so:
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
In Section
Seekers of Perl Wisdom
|
|