From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 5A98EBBAF for ; Mon, 12 Jul 2010 15:19:36 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AskBACKzOkzRVda0mGdsb2JhbACgMwgVAQEBAQEICQwHESKvUoU5iQEBAQMFhSIEiEyHNw X-IronPort-AV: E=Sophos;i="4.55,188,1278280800"; d="scan'208";a="54008434" Received: from mail-iw0-f180.google.com ([209.85.214.180]) by mail3-smtp-sop.national.inria.fr with ESMTP; 12 Jul 2010 15:19:35 +0200 Received: by iwn8 with SMTP id 8so5984018iwn.39 for ; Mon, 12 Jul 2010 06:19:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=N5IHXo1hPzumQAg7KrjtPWb1G4VzVvB6RUvhzdkhsgg=; b=NVKDHGQ0w1vN74TjfcMhsEByDWfimxaqckZWeDfY99fZu6nmqYRJVQyKVjRM2e1Kr5 QzwDIKCLOigzpqQFz+0LOydCWldv8dfh/nHpK7jFBj3motDgZA962Bb1oRsgGATLE0Rk zMkqD+pe0G5qfRglj3bsTLHF5g10OxaVEJNns= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=gb575kHSBgz3pVwErKqPVxwre+Rp4MXr6osKzXQ0Xvt/fK4i3mA9wUUqIJWzvPSIr9 DCljYiyXPD5y/I72vyP/Y0qcR0flR+196ea3aLgByDwE7cnLLSdZhRrIWOA8xQVO5Tt9 T99gfJwXRcQy3Wr6owICvlm6AUQeshM9d9/bM= MIME-Version: 1.0 Received: by 10.231.169.145 with SMTP id z17mr14555530iby.13.1278940774869; Mon, 12 Jul 2010 06:19:34 -0700 (PDT) Sender: gaspard.buma@gmail.com Received: by 10.231.20.73 with HTTP; Mon, 12 Jul 2010 06:19:34 -0700 (PDT) In-Reply-To: References: Date: Mon, 12 Jul 2010 15:19:34 +0200 X-Google-Sender-Auth: r8z55n56xNj6u0LZXrHZY29TCt4 Message-ID: Subject: Re: [Caml-list] ocaml for embedding From: Gaspard Bucher To: David MENTRE Cc: caml-list@yquem.inria.fr Content-Type: text/plain; charset=ISO-8859-1 X-Spam: no; 0.00; ocaml:01 jocaml:01 runtime:01 ocaml:01 runtimes:01 runtime:01 acb:98 15.:98 wrote:01 caml-list:01 caml-list:01 caml:02 caml:02 embedding:03 concurrency:04 Thanks for the insight David. I also found this email from Xavier Leroy (http://caml.inria.fr/pub/ml-archives/caml-list/2002/11/64c14acb90cb14bedb2cacb73338fb15.en.html). I will start with a single context (eventually built from several scripts). If someone ever needs distributed computing, it's easy to run several instances of Rubyk passing messages. Just a final question on the topic: has JoCaml anything to do with this concurrency (shared memory) question ? Gaspard On Mon, Jul 12, 2010 at 11:14 AM, David MENTRE wrote: > Hello, > > 2010/7/9 Gaspard Bucher : >> From my understanding of the use of >> caml_startup (or caml_main), this means that the caml runtime is >> global. > > Yes. > >> Is there a way to avoid: >> >> 1. global locking (or locking only during script recompilation) > > I don't think so. > >> 2. script level encapsulation > > I don't know. > > > You might play with the C symbols and a bit a C pre-processing to > generate several different OCaml runtimes that would be linked with > you application. But, as far as I know, the OCaml runtime has not be > designed to be included several times within the same application. > > Sincerely yours, > david >