caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: malc <malc@pulsesoft.com>
To: Caml List <caml-list@inria.fr>
Subject: Usage of condition variables
Date: Thu, 17 Aug 2006 08:05:30 +0400 (MSD)	[thread overview]
Message-ID: <Pine.LNX.4.64.0608170749530.631@home.oyster.ru> (raw)

Hello,

Recently in the process of discussing one problem i was having subject
temporarily switched to the condition variables:
http://groups.google.com/group/comp.unix.programmer/tree/browse_frm/thread/5394d00781547266/17c8a349edae9d3c?rnum=1_done=%2Fgroup%2Fcomp.unix.programmer%2Fbrowse_frm%2Fthread%2F5394d00781547266%2F17c8a349edae9d3c%3Ftvc%3D1%26q%3Dmalc%26#doc_b586db199a5fd81a

Also according to:
http://www.opengroup.org/onlinepubs/009695399/functions/pthread_cond_signal.html

<quote>
The pthread_cond_broadcast() or pthread_cond_signal() functions may be
called by a thread whether or not it currently owns the mutex that threads
calling pthread_cond_wait() or pthread_cond_timedwait() have associated
with the condition variable during their waits; however, if predictable
scheduling behavior is required, then that mutex shall be locked by the
thread calling pthread_cond_broadcast() or pthread_cond_signal().
</quote>

However it seems like members of OCaml team strongly prefer unlock
then signal pattern. Given that Xavier Leroy is also the author of
LinuxThreads there might be some good arguments to have it that way,
or maybe it's because of vmthreads, perhaps someone could give the
rationale?

So far only this:
http://groups.google.com/group/comp.unix.programmer/msg/02751100d1b953e3
was in favour of unlock then signal.

--
mailto:malc@pulsesoft.com


             reply	other threads:[~2006-08-17  4:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-17  4:05 malc [this message]
2006-08-17  7:41 ` [Caml-list] " skaller
2006-08-17 11:55 ` Xavier Leroy

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=Pine.LNX.4.64.0608170749530.631@home.oyster.ru \
    --to=malc@pulsesoft.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).