[RFC] Stringify a thread
[email protected] (Jerry Hedden) Wed, 4 Oct 2006 12:36:32 -0700 (PDT)
| Newsgroups | perl.perl5.porters,perl.ithreads |
|---|---|
| Message-ID | <[email protected]> |
I'm considering a one line addition to the threads module to overload
the string value of a thread to return its ID:
'""' => sub { shift->tid() }
Since thread IDs are unique, thread objects could be used as hash keys
in a more rational way:
$timeouts{$thr} = $secs;
Also, it would also simply such things as:
print("Thread $thr running...\n");
Comments?
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com