Need a bit of help with threads programming

D

David Morel

Hi all,

I need a subroutine that reads the next line in an open file.
Ordinarily this would be a trivial subroutine... you just read a line
off of a filehandle.

However, I need this subroutine to be threads-safe. That is, I plan on
having many threads be using this subroutine, and I need to make sure
that it is always reading the next line no matter what thread is using
it.

The problem I came across is that you are not allowed to share
filehandles (GLOBS). So how would I go about implementing this
routine?

Thanks,
David Morel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,139
Messages
2,570,805
Members
47,351
Latest member
LolaD32479

Latest Threads

Top