From: Gregory Malecha <gmalecha@gmail.com>
To: "Daniel Bünzli" <daniel.buenzli@erratique.ch>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Threads Scheduling
Date: Tue, 13 Apr 2010 17:56:06 -0400 [thread overview]
Message-ID: <k2o6d110d191004131456va1797d2bkfd72ee65dbfb6679@mail.gmail.com> (raw)
In-Reply-To: <s2k91a3da521004131404qc12e347fz372b889214f75201@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1154 bytes --]
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
returns.
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
lost.
Thanks Daniel, I'll take a look at it.
On Tue, Apr 13, 2010 at 5:04 PM, Daniel Bünzli
<daniel.buenzli@erratique.ch>wrote:
> 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
[-- Attachment #2: Type: text/html, Size: 2025 bytes --]
next prev parent reply other threads:[~2010-04-13 21:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-13 20:33 Gregory Malecha
2010-04-13 20:54 ` [Caml-list] " Jake Donham
2010-04-13 21:04 ` Daniel Bünzli
2010-04-13 21:56 ` Gregory Malecha [this message]
2010-04-14 8:40 ` Philippe Wang
2010-04-14 18:18 ` Goswin von Brederlow
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=k2o6d110d191004131456va1797d2bkfd72ee65dbfb6679@mail.gmail.com \
--to=gmalecha@gmail.com \
--cc=caml-list@yquem.inria.fr \
--cc=daniel.buenzli@erratique.ch \
/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