Jerry Quinn , dans le message (digitalmars.D.learn:29763), a écrit : > Lutger Blijdestijn Wrote: > >> If you didn't know, the concurrency chapter of tdpl is a free chapter: >> http://www.informit.com/articles/article.aspx?p=1609144 >> >> It has an example of file copying with message passing: >> http://www.informit.com/articles/article.aspx?p=1609144&seqNum=7 > > 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. That may make your life easier. I would actually use a file if I use multiprocessing, but not necessarily for multithreading.