caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jonathan Roewen <jonathan.roewen@gmail.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Re: Thread Local Storage
Date: Tue, 14 Feb 2006 15:40:20 +1300	[thread overview]
Message-ID: <ad8cfe7e0602131840m30c25966v15fb463ce23bc837@mail.gmail.com> (raw)
In-Reply-To: <dspllm$5nk$1@sea.gmane.org>

> 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.

Yes, but that means that you need functions to lookup the values,
rather than having the value have process-dependent values globally.
Think like Sys.argv (etc) -- this'd require changes to the interfaces
(not such a big deal, since I have control over all interfaces).

But to go even further, having distinct descriptors for
stdin/stdout/stderr, then you could see where this would become
unstuck. Whilst I have code that can change the value transparently
for stdin/stdout/stderr, this'd make for a bigger process switch if I
had to do for all TLS values.

Perhaps what I need would require a change to the compiler and runtime
=/ What I'd also want to avoid, but I guess I'll have to face the
music....

Jonathan


  reply	other threads:[~2006-02-14  2:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-13  4:29 [Caml-list] " Jonathan Roewen
2006-02-13 10:05 ` Vincenzo Ciancia
2006-02-14  2:40   ` Jonathan Roewen [this message]
2006-02-14  4:06     ` [Caml-list] " skaller
2006-02-14 21:40       ` Florian Weimer
2006-02-14 22:21         ` skaller
2006-03-01  7:37           ` Florian Weimer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ad8cfe7e0602131840m30c25966v15fb463ce23bc837@mail.gmail.com \
    --to=jonathan.roewen@gmail.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).