From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id AFCABBBAF for ; Mon, 12 Jul 2010 11:14:31 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aq4BAMF5OkzRVda0mGdsb2JhbACgMAgVAQEBAQEICQwHESKuSoUDiQEBAQMFhSIEiEyHNw X-IronPort-AV: E=Sophos;i="4.55,187,1278280800"; d="scan'208";a="63153728" Received: from mail-iw0-f180.google.com ([209.85.214.180]) by mail1-smtp-roc.national.inria.fr with ESMTP; 12 Jul 2010 11:14:31 +0200 Received: by iwn8 with SMTP id 8so5754760iwn.39 for ; Mon, 12 Jul 2010 02:14:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:cc:content-type; bh=6LXanE77TGNKIF/cfZey39QjcipBcG3FnCXeTu1xtv8=; b=OTNWfkXAZoe3J+9qeu6wa6DXmsAJc+IggrWQb6jnHtJVIDODjaBxkXpRKfcC0jRhtB UUx5DKVYFVO3AhuR9o1V9NW9eUG5odK/w20TEIAxFbYgV+Fm/LMj97MBTsDWCOID1WLf 41z6k87Tb9qRyVukTqfF9KQPNPXifWVmA1vxs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=HMpK/laTYRPoKEziPyakPvMhdsba2XAI+KwVpxR9xwb3Ch6Bmp4VcgGActqa3SPsPW NLpC66OfHko2ElC6ZR3kcBTrfQfRJXdR/zqAvN0X6Mi643RoIuAyPzfN4CFL7Q98QLqH pkJ9zAeclIArjaetWY5veXwwgj91Mn30+n4cw= Received: by 10.231.130.99 with SMTP id r35mr12852821ibs.171.1278926070526; Mon, 12 Jul 2010 02:14:30 -0700 (PDT) MIME-Version: 1.0 Sender: david.mentre@gmail.com Received: by 10.231.208.73 with HTTP; Mon, 12 Jul 2010 02:14:07 -0700 (PDT) In-Reply-To: References: From: David MENTRE Date: Mon, 12 Jul 2010 11:14:07 +0200 X-Google-Sender-Auth: FmvrfC9WZgDswBN5VPQTbVAzTaA Message-ID: Subject: Re: [Caml-list] ocaml for embedding To: Gaspard Bucher Cc: caml-list@yquem.inria.fr Content-Type: text/plain; charset=ISO-8859-1 X-Spam: no; 0.00; ocaml:01 runtime:01 ocaml:01 runtimes:01 runtime:01 caml-list:01 caml:02 caml:02 embedding:03 startup:05 linked:07 symbols:09 bit:11 might:12 think:13 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