Romain Beauxis <to...@rastageeks.org> writes: > Le vendredi 16 juillet 2010 08:05:10, vous avez écrit : >> > Now, the main thread does not need to be a task.. >> >> But then how does the main thread notice when a checksum is finished >> computing? The information has to flow both ways. > > I would say its implemented in the replay_request function. You can think of > many structures, a shared Hashtbl, message sending.. The loop in the main > thread can send tasks and check for completed tasks as well... > > > Romain
No, it couldn't. The main thread must be blocked waiting for something. That something would either be waiting for select to return or the main thread runs a queue and a seperate select thread and worker threads throw tasks at it. I'm not having a main thread that checks every 0.001s if a task happens to be done. MfG Goswin _______________________________________________ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs