Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Threads and print

by cdarke (Prior)
on Apr 16, 2009 at 08:24 UTC ( #757887=note: print w/replies, xml ) Need Help??


in reply to Threads and print

By correcting your calculation of $N.
$N = $to/5;
However, you still have an issue because the records overlap. Didn't we discuss this before here 755631? I suggest you use a single thread to write to the log file, rather than trying to get all the threads to write at the same time.

Replies are listed 'Best First'.
Re^2: Threads and print
by sandy1028 (Sexton) on Apr 16, 2009 at 08:39 UTC
    Can you please tell me some tutorial regarding it. Like how to create a single log file for each thread. It the $to value is increased also only 5 threads should be created.
      The above code works fine with commenting lock $$semRef; Can anyone please explain me what is the use of locking method in the above code.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2023-11-28 23:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?