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
[Caml-list] Thread Local Storage
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-02-13 (10:06)
From: Vincenzo Ciancia <vincenzo_yahoo_addressguard-gmane@y...>
Subject: Re: Thread Local Storage
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