Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: [threads] Open a file in one thread and allow others to write to it

by Gangabass (Vicar)
on Nov 16, 2009 at 13:13 UTC ( [id://807440]=note: print w/replies, xml ) Need Help??


in reply to Re: [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

Sorry, you didn't understand me (my error). Of course i know that file handler is cloned between threads. But i need more: i need to open file handler in the thread and allow other threads to write to it.

Or shortly i need a solution to write to log file (from each thread). This is easy. But i'm also need to check for log size. So if it arrive some value i need to close old log file and open new one. And this event (maximum log file) occur in one of the thread (i have shared variable which increment after each write to log).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://807440]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2024-03-29 10:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found