|Keep It Simple, Stupid|
Re^3: [threads] Open a file in one thread and allow others to write to itby BrowserUk (Pope)
|on Nov 16, 2009 at 12:58 UTC||Need Help??|
S'funny, cos the code I posted is very well tested (going back to 5.8.0 and right upto 5.8.9 & 5.10.1 (64-bit)!
The mistake you're making is reading "Filehandles cannot be made 'shared'." to mean 'filehandles cannot be shared'. Those phrases do not be not mean the same thing.
Filehandles are process global entities and therefore can be cloned. Which means that each thread created after a filehandle comes into existance gets it's own copy of the global.
Try the code I posted. Tell me how you get on :)
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.