Just another Perl shrine | |
PerlMonks |
Re: [threads] Open a file in one thread and allow others to write to itby BrowserUk (Patriarch) |
on Nov 16, 2009 at 12:41 UTC ( [id://807426]=note: print w/replies, xml ) | Need Help?? |
This opens a file, starts 4 threads; writes to that file from all 4 threads (with locking) at random for a short while then stops the threads. It then reopens the file and prints it to stdout:
What more do you need? 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
|
|