From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 13A3D820A1 for ; Mon, 19 Aug 2013 08:10:25 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of mshinwell@janestreet.com) identity=pra; client-ip=38.105.200.229; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="mshinwell@janestreet.com"; x-sender="mshinwell@janestreet.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of mshinwell@janestreet.com designates 38.105.200.229 as permitted sender) identity=mailfrom; client-ip=38.105.200.229; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="mshinwell@janestreet.com"; x-sender="mshinwell@janestreet.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@tot-dmz-mxout1.janestreet.com) identity=helo; client-ip=38.105.200.229; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="mshinwell@janestreet.com"; x-sender="postmaster@tot-dmz-mxout1.janestreet.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvABAF22EVImacjlnGdsb2JhbABbhAEMglO8XoEZHg4BAQEBAQYNCQkUKIIkAQEFQAEBNwEPCwsDCi4iEgEFARwGE4gQA5hOiwuERwEFjQkGkGAHhBKXZ49wFimEQw X-IPAS-Result: AvABAF22EVImacjlnGdsb2JhbABbhAEMglO8XoEZHg4BAQEBAQYNCQkUKIIkAQEFQAEBNwEPCwsDCi4iEgEFARwGE4gQA5hOiwuERwEFjQkGkGAHhBKXZ49wFimEQw X-IronPort-AV: E=Sophos;i="4.89,911,1367964000"; d="scan'208";a="24204241" Received: from mx5.janestreet.com (HELO tot-dmz-mxout1.janestreet.com) ([38.105.200.229]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 19 Aug 2013 08:10:23 +0200 Received: from tot-oib-smtp1.delacy.com ([172.27.22.15] helo=tot-smtp) by tot-dmz-mxout1.janestreet.com with esmtp (Exim 4.76) (envelope-from ) id 1VBIfU-0006os-Km for caml-list@inria.fr; Mon, 19 Aug 2013 02:10:20 -0400 Received: from tot-dmz-mxgoog1.delacy.com ([172.27.224.14] helo=mxgoog2.janestreet.com) by tot-smtp with esmtps (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1VBIfU-0003tw-IF for caml-list@inria.fr; Mon, 19 Aug 2013 02:10:20 -0400 Received: from mail-vb0-f53.google.com ([209.85.212.53]) by mxgoog2.janestreet.com with esmtp (Exim 4.76) (envelope-from ) id 1VBIfU-0003UI-FG for caml-list@inria.fr; Mon, 19 Aug 2013 02:10:20 -0400 Received: by mail-vb0-f53.google.com with SMTP id i3so2872509vbh.40 for ; Sun, 18 Aug 2013 23:10:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=TdwhUyRUiu3oO83mVMRpvn5nHpCLFbk2yGSMaFR1LQE=; b=GrC4+8w5b5+lOZwJSDMS93bsIb/P7A9JW7vrEfVSdZ4HenLJCABb+GO5J1IKMkSU5U zvye94eN5VjVIaop0RhM29lTzCeRchmoq7H7JugWi6IFQ9Bkmfj6YDyUiFlWfhb6Smw0 POSkyoIOaXr6KuTLECTYDZMoKm9ojnbuobsKY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=TdwhUyRUiu3oO83mVMRpvn5nHpCLFbk2yGSMaFR1LQE=; b=DD9MDk+h9xKB2T2KRea8HnsPpBWV6Lw1yXHwajiTRytW09EHVoOnEffUJpya0cBFpu 8289Mu0KbRiEaCDcZ1ZjwrNw0pu4AP3m3hx7R1A9MvpV24SOYALKfXpcKTXL/rZLTjEh 66Y49GWq0BFT+t73Yoi32Z9GQB0DL0anLgs43f99lMsqUelyzD0yY4o2kqaOtRccrlWm 5M4Y2UVgIB2wABwf2xvLhFOcxzkireOmMQrxg9m4x1d0zHiZro1h1J0nuhWkFUCSeUEo k7pztDosZp/mc9G51VcqwoK32IK7ll/VXWFK9QClPu99VBjBa1Kvgzu2Y4xnBVLfBW8a JAdQ== X-Received: by 10.221.51.206 with SMTP id vj14mr11823199vcb.17.1376892620308; Sun, 18 Aug 2013 23:10:20 -0700 (PDT) X-Gm-Message-State: ALoCoQkeowKDKfldZ64NcgrjKM+s5zL0T1xfO4wQRrap0zbmMctxov/txQAbUydLA72JKE7Xt7DPf+pAXY2RsQk1N2m6rQ6U73ZIbT1PUEVFcwcFKuTaHPrOl3Jmon878IGHmwGOinFDqDu+kszUCPeWa3hz1HArgw== MIME-Version: 1.0 X-Received: by 10.221.51.206 with SMTP id vj14mr11823192vcb.17.1376892620232; Sun, 18 Aug 2013 23:10:20 -0700 (PDT) Received: by 10.58.228.162 with HTTP; Sun, 18 Aug 2013 23:10:20 -0700 (PDT) In-Reply-To: References: <520DE6F8.9000105@etorok.net> Date: Mon, 19 Aug 2013 07:10:20 +0100 Message-ID: From: Mark Shinwell To: Yaron Minsky Cc: Markus Mottl , =?ISO-8859-1?Q?T=F6r=F6k_Edwin?= , "caml-list@inria.fr" Content-Type: text/plain; charset=ISO-8859-1 X-Validation-by: mshinwell@janestreet.com Subject: Re: [Caml-list] Threads and "transaction isolation" in OCaml On 17 August 2013 01:06, Yaron Minsky 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