caml-list - the Caml user's mailing list
 help / Atom feed
From: Richard Jones <>
To: Jason Ganetsky <>
Subject: Re: [Caml-list] Multiprocessor support in OCaml
Date: Sun, 22 Apr 2007 09:44:20 +0100
Message-ID: <> (raw)
In-Reply-To: <>

On Sun, Apr 22, 2007 at 03:42:09AM -0400, Jason Ganetsky wrote:
> I'm new to this list, and new to OCaml (although, have some experience with
> SML).

There's a beginner's list:
> Beginner's list:

> Anyway, I have recently written an OCaml thread pool implementation, on top
> of the Thread and Event modules. I did this for the purpose of exploiting an
> SMP system I have, and was a disappointed to read today that OCaml doesn't
> support multiprocessor systems.
> I played around with it a little, and discovered that by liberally calling
> Thread.yield, I do cajole my threads into running on multiple processors. Is
> this behavior normal, or have I discovered a problem with the Thread module?
> I'm certainly happy that I can get it to use my SMP... but I will stop it at
> once if you tell me that this is unsafe.

The garbage collector doesn't support concurrency, so there's a big
global lock around all OCaml code.


Richard Jones
Red Hat

  reply index

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-22  7:42 Jason Ganetsky
2007-04-22  8:44 ` Richard Jones [this message]
2007-04-22 10:30 ` [Caml-list] " Xavier Leroy
2007-04-22 11:55   ` Don Syme
2007-04-22 10:58 ` Erik de Castro Lopo
2007-04-22 13:29   ` Jon Harrop
2007-04-22 17:31 ` Zheng Li
     [not found]   ` <>
2007-04-22 17:52     ` [Caml-list] " Jason Ganetsky
2007-04-23  8:10       ` Richard Jones

Reply instructions:

You may reply publically 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:

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

  git send-email \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

caml-list - the Caml user's mailing list

Archives are clonable: git clone --mirror

AGPL code for this site: git clone public-inbox