Multithreaded file IO?

Jerry jlquinn at optonline.net
Wed Sep 28 11:25:41 PDT 2011


travert at phare.normalesup.org (Christophe) writes:

> Jerry Quinn , dans le message (digitalmars.D.learn:29763), a écrit :
>> What I really want is a shared fifo where the input is lines from a 
>> file, and many workers grab something from the fifo.  They then push 
>> their results into a shared reordering output queue.
>
> My 2 cent advice:
>
> Does the queue really has to be a file ?
> You could read it completely before starting, and then just share 
> your instructions as strings for example.

Yes, these files could be large enough that the memory cost of loading
is an issue.  Also, I should be able to do this with input from stdin.

At this point, I'm trying to figure out how to implement a shared
fifo in D as much as solve my original problem :-)

Jerry


More information about the Digitalmars-d-learn mailing list