From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id BD93DBBAF for ; Fri, 16 Jul 2010 15:20:04 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsEAF75P0zV+668/2dsb2JhbACgWr5jhSQEg34 X-IronPort-AV: E=Sophos;i="4.55,214,1278280800"; d="scan'208";a="54340612" Received: from rastageeks.org (HELO mail.rastageeks.org) ([213.251.174.188]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 16 Jul 2010 15:20:04 +0200 Received: from leonard.localnet (adsl-150-55-116.msy.bellsouth.net [72.150.55.116]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.rastageeks.org (Postfix) with ESMTPSA id 7329D43FA2; Fri, 16 Jul 2010 15:30:37 +0200 (CEST) From: Romain Beauxis To: Goswin von Brederlow Subject: Re: [Caml-list] Smart ways to implement worker threads Date: Fri, 16 Jul 2010 08:20:36 -0500 User-Agent: KMail/1.13.3 (Linux/2.6.32-4-amd64; KDE/4.4.4; x86_64; ; ) References: <87sk3mcaeq.fsf@frosties.localdomain> <201007152319.10974.toots@rastageeks.org> <871vb3bmrd.fsf@frosties.localdomain> In-Reply-To: <871vb3bmrd.fsf@frosties.localdomain> Cc: caml-list@yquem.inria.fr MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <201007160820.37108.toots@rastageeks.org> X-Spam: no; 0.00; hashtbl:01 10,:98 threads:01 caml-list:01 structures:02 implemented:02 vendredi:03 checksum:04 computing:05 implement:06 shared:06 ecrit:06 thread:06 thread:06 function:08 Le vendredi 16 juillet 2010 08:05:10, vous avez =E9crit : > > Now, the main thread does not need to be a task..=20 >=20 > 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 o= f=20 many structures, a shared Hashtbl, message sending.. The loop in the main=20 thread can send tasks and check for completed tasks as well... Romain