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 nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 34BBCBB81 for ; Mon, 13 Feb 2006 11:06:10 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id k1DA69n4002325 for ; Mon, 13 Feb 2006 11:06:09 +0100 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id LAA10373 for ; Mon, 13 Feb 2006 11:06:08 +0100 (MET) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id k1DA67DL002318 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Mon, 13 Feb 2006 11:06:08 +0100 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1F8aak-00054Y-OO for caml-list@inria.fr; Mon, 13 Feb 2006 11:05:58 +0100 Received: from host215-160.pool8249.interbusiness.it ([82.49.160.215]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 13 Feb 2006 11:05:58 +0100 Received: from vincenzo_yahoo_addressguard-gmane by host215-160.pool8249.interbusiness.it with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 13 Feb 2006 11:05:58 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: Vincenzo Ciancia Subject: Re: Thread Local Storage Date: Mon, 13 Feb 2006 11:05:59 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: host215-160.pool8249.interbusiness.it User-Agent: KNode/0.10 Sender: news X-Miltered: at nez-perce with ID 43F05A11.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 43F05A0F.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; ocaml:01 bytecode:01 globals:01 hashtable:01 attenzione:98 l'indirizzo:98 posta:98 nel:98 campo:98 wrote:01 tls:01 thread:02 thread:02 tree:02 instances:02 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 Jonathan Roewen wrote: > I'm wondering if it'd be at all possible to somehow implement > something akin to TLS under the ocaml bytecode vmthreads package. > > This is for having software-based processes, and globals whose > instances are unique to a given process. I don't know if there are better solutions but at least you can use an hashtable or a balanced tree or whatever (protected by a mutex) indexed on thread identifiers as reported by "Thread.id (Thread.self ())" or something similar. Bye Vincenzo -- Please note that I do not read the e-mail address used in the from field but I read vincenzo_ml at yahoo dot it Attenzione: non leggo l'indirizzo di posta usato nel campo from, ma leggo vincenzo_ml at yahoo dot it