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
Threads Scheduling
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-04-13 (21:56)
From: Gregory Malecha <gmalecha@g...>
Subject: Re: [Caml-list] Threads Scheduling
Hi Jake,

The documentation for Condition.wait says:

wait c m atomically unlocks the mutex m and suspends the calling process on
the condition variable c. The process will restart after the condition
variable c has been signalled. The mutex m is locked again before wait

I figured that I needed to lock and unlock the mutex in the child threads
because otherwise it is possible for the condition variable to be signaled
before the main thread waits, which I thought means that the signal is

Thanks Daniel, I'll take a look at it.

On Tue, Apr 13, 2010 at 5:04 PM, Daniel Bünzli

> You may also be interested in this thread [1].
> Daniel
> [1]
> http://groups.google.com/group/fa.caml/browse_thread/thread/9606b618dab79fb5
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs

gregory malecha