in reply to Re^5: [threads] Open a file in one thread and allow others to write to it
in thread [threads] Open a file in one thread and allow others to write to it
«That's why I used a shared variable to coordinate »
Your lock variable coordinates the concurrency between Perl Threads, it won't sync the OS File->writes, cos each Thread is using a cloned FileHandled and you are trusting OS Synchronization.
Now I make you a question? Why are you using a lock variable, since you are using a cloned FileHandle that is not shared between threads? You are trusting the OS sync, so the use of that shared LOCK variable is useless.It only minimizes OS->File->Writes thread concurrency
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: [threads] Open a file in one thread and allow others to write to it
by BrowserUk (Patriarch) on Nov 16, 2009 at 13:56 UTC | |
|