caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Mark Shinwell <mshinwell@janestreet.com>
To: Yaron Minsky <yminsky@janestreet.com>
Cc: "Markus Mottl" <markus.mottl@gmail.com>,
	"Török Edwin" <edwin+ml-ocaml@etorok.net>,
	"caml-list@inria.fr" <caml-list@inria.fr>
Subject: Re: [Caml-list] Threads and "transaction isolation" in OCaml
Date: Mon, 19 Aug 2013 07:10:20 +0100	[thread overview]
Message-ID: <CAM3Ki75k3V7bLffL5meJv40UixTd1dNwVMJxiYifhqvhkBX+jA@mail.gmail.com> (raw)
In-Reply-To: <CACLX4jQ7GK2Et=VC42hhjRYiuCh86ZWF5DHTNV1HGReN4BYOAQ@mail.gmail.com>

On 17 August 2013 01:06, Yaron Minsky <yminsky@janestreet.com> wrote:
> I'd like to second Markus' request here.  We definitely take advantage
> of this behavior in the compiler, and I hadn't realized that it didn't
> hold in byte-code.  I do think this is a rather valuable hack, and it
> would be good to make the bounds of its applicability more explicit.

I have wondered in the past if we should introduce a syntactic
construct to delimit areas of code that rely on the no-thread-switch
property.  I think it would probably be reasonable to actually
check that the expression inside the construct was guaranteed under
the current runtime not to cause a context switch (such expressions are
likely to be, and should be, straightforward).  At runtime, the
construct would have no semantic effect.  For the scenario described
with bytecode, the construct could just cause a compiler error, at
least at present.

Mark

  reply	other threads:[~2013-08-19  6:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-15 21:57 Markus Mottl
2013-08-16  1:28 ` John F Carr
2013-08-16  2:55   ` Markus Mottl
2013-08-16  8:46 ` Török Edwin
2013-08-16 16:07   ` Markus Mottl
2013-08-17  0:06     ` Yaron Minsky
2013-08-19  6:10       ` Mark Shinwell [this message]
2013-08-19 14:18         ` Markus Mottl
2013-08-19  7:33     ` 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=CAM3Ki75k3V7bLffL5meJv40UixTd1dNwVMJxiYifhqvhkBX+jA@mail.gmail.com \
    --to=mshinwell@janestreet.com \
    --cc=caml-list@inria.fr \
    --cc=edwin+ml-ocaml@etorok.net \
    --cc=markus.mottl@gmail.com \
    --cc=yminsky@janestreet.com \
    /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).