From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=AWL,HTML_10_20,HTML_MESSAGE autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr 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 B63DEBBC1 for ; Sat, 15 Mar 2008 06:19:54 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ah8BAMn42kfRVca4kmdsb2JhbACCOzeODgEBAQEHBAQJChaQYIcG X-IronPort-AV: E=Sophos;i="4.25,505,1199660400"; d="scan'208";a="9482009" Received: from discorde.inria.fr ([192.93.2.38]) by mail1-smtp-roc.national.inria.fr with ESMTP; 15 Mar 2008 06:19:54 +0100 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id m2F5JrXv000547 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Sat, 15 Mar 2008 06:19:54 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ah8BAMn42kfRVca4kmdsb2JhbACCOzeODgEBAQEHBAQJChaQYIcG X-IronPort-AV: E=Sophos;i="4.25,505,1199660400"; d="scan'208";a="9482008" Received: from rv-out-0910.google.com ([209.85.198.184]) by mail1-smtp-roc.national.inria.fr with ESMTP; 15 Mar 2008 06:19:53 +0100 Received: by rv-out-0910.google.com with SMTP id g11so2339677rvb.57 for ; Fri, 14 Mar 2008 22:19:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=2PSSDQxOqBxeGw4cuvbvbzsz03WSAm1Nmg8+8SuUzeQ=; b=Tpo9jJbRJS91veeaCx71VjSCKeyCdP9KYQw+ZgjLUtBVjxosw2qVmSpJ0CvQ+Sm3U8okkf5h+RACIaSZn7psNlqw5fh3yRh5WFLPsBvqZsnNanFjGI15LgJ3tG1KMExnVDjMa/poBKOifu2DdjI0DccYBnym+EXTrnfnK/b621w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=J2Y3VvFbmZQCbn91GKck1b2rA+ZuFqni4pUgQtkIXwCRxuqIVq6+WXN1FzqoLQKBO/1hzjh5/9FnhMwSs986rjjBy9yRw41ETfGQxPzBsX/p79dhsoLkrGT0gLYTpQDT9F1eb3+AsfFvdqU1oNULNKz2BLg0G3zDghhAkaJi1WE= Received: by 10.114.146.1 with SMTP id t1mr13411599wad.20.1205558392719; Fri, 14 Mar 2008 22:19:52 -0700 (PDT) Received: by 10.114.169.15 with HTTP; Fri, 14 Mar 2008 22:19:52 -0700 (PDT) Message-ID: Date: Fri, 14 Mar 2008 22:19:52 -0700 From: "Francois Rouaix" To: caml-list@inria.fr Subject: Running OCaml code on (native) non-OCaml threads MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_3439_12185162.1205558392706" X-Miltered: at discorde with ID 47DB5C79.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 non-ocaml:01 ocaml:01 non-ocaml:01 runtime:01 struct:01 --f:01 runtime:01 struct:01 --f:01 threads:01 threads:01 posix:01 posix:01 caml:02 ------=_Part_3439_12185162.1205558392706 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Folks,Two years back, I asked about a situation where I wanted to run OCaml code on threads created by a non-OCaml library, and the answer was that it wasn't possible. Again today I'm facing the same situation, but this time I believe there might be a way around it. In theory, wouldn't it be possible to "attach" any posix thread to the OCaml runtime, after the thread creation? The existing code isn't structured that way (caml_thread_new, caml_thread_start), but superficially it looks like one could set up the caml_thread_struct, if there isn't one for that thread already. Am I missing something critical? Thanks, --f ------=_Part_3439_12185162.1205558392706 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Folks,
Two years back, I asked about a situation where I wanted to run OCaml code on threads created by a non-OCaml library, and the answer was that it wasn't possible. Again today I'm facing the same situation, but this time I believe there might be a way around it.
In theory, wouldn't it be possible to "attach" any posix thread to the OCaml runtime, after the thread creation? The existing code isn't structured that way (caml_thread_new, caml_thread_start), but superficially it looks like one could set up the caml_thread_struct, if there isn't one for that thread already. Am I missing something critical?
Thanks,
--f

------=_Part_3439_12185162.1205558392706--