English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Smart ways to implement worker threads
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-07-16 (13:20)
From: Romain Beauxis <toots@r...>
Subject: Re: [Caml-list] Smart ways to implement worker threads
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...