From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=AWL,SPF_SOFTFAIL autolearn=disabled version=3.1.3 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id B58CDBB84 for ; Mon, 12 Jan 2009 17:44:54 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAKYBa0lSkiEx/2dsb2JhbADTM4Vv X-IronPort-AV: E=Sophos;i="4.37,253,1231110000"; d="scan'208";a="33628654" Received: from 5070.info ([82.146.33.49]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 12 Jan 2009 17:44:54 +0100 X-Bogosity: Unsure, tests=bogofilter Received: from [192.168.1.21] (92-124-28-6.pppoe.irtel.ru [92.124.28.6] (may be forged)) (authenticated bits=0) by 5070.info (8.14.3/8.14.0) with ESMTP id n0CGiToL071806 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 12 Jan 2009 16:44:52 GMT (envelope-from john@ispsystem.com) Subject: Re: [Caml-list] memory usage From: John Lepikhin To: caml-list@yquem.inria.fr In-Reply-To: <496B6FE3.1010403@bik-gmbh.de> References: <1231746106.4376.27.camel@john-laptop> <496B6FE3.1010403@bik-gmbh.de> Content-Type: text/plain Date: Tue, 13 Jan 2009 00:44:24 +0800 Message-Id: <1231778664.4376.228.camel@john-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.24.2 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-3.0 (5070.info [82.146.33.49]); Mon, 12 Jan 2009 16:44:53 +0000 (UTC) X-Spam: no; 0.00; threads:01 threads:01 caml-list:01 module:03 let:03 let:03 exit:04 consequence:04 thread:06 thread:06 john:08 john:08 memory:09 shutdown:10 shutdown:10 > > Each thread is killed after work is done > How do you "kill" the threads? I hope this is just a figure of > speech for "I do an orderly shutdown of each thread after work is done." Well, that was consequence of my bad English :-) Threads finish their work and exit. I also made a simple wrapper to Thread.create to be sure that all work inside threads is done: module MyThread = let create f p = let dowork _ = (* log thread creation *) f p; (* log thread shutdown *) in Thread.create dowork () end