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=1.4 required=5.0 tests=AWL,SPF_SOFTFAIL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 3C1B6BC0A for ; Mon, 8 Jan 2007 23:15:08 +0100 (CET) Received: from mail-red.research.att.com (mail-red.research.att.com [192.20.225.110]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l08MF7sP007659 for ; Mon, 8 Jan 2007 23:15:07 +0100 Received: from [135.207.240.25] (vpn-25.research.att.com [135.207.240.25]) by bigmail.research.att.com (8.13.7+Sun/8.11.6) with ESMTP id l08MF70S022236; Mon, 8 Jan 2007 17:15:07 -0500 (EST) Message-ID: <45A2C26A.8000506@research.att.com> Date: Mon, 08 Jan 2007 17:15:06 -0500 From: Trevor Jim User-Agent: Thunderbird 1.5.0.8 (X11/20061117) MIME-Version: 1.0 To: Markus Mottl Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] calling ocaml from threaded C program References: <45A29E39.9030403@research.att.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at discorde with ID 45A2C26B.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 ocaml:01 threads:01 threads:01 buffer:01 buffer:01 -trevor:01 caml-list:01 functions:01 api:01 implemented:02 threaded:03 thread:05 thread:05 trevor:06 Thanks. Maybe someone on the list has some experience and could contribute some advice... What I have is a long-running ocaml thread, invoked from Objc, and I would like to have other Objc threads running that report on the progress of the ocaml thread, etc. That means communication between the ocaml thread and the Objc threads, which I now know cannot occur using most functions of the ocaml C api. So any advice on the best way to communicate between these threads? I am guessing I need to having locking implemented in Objc and exported to ocaml, then both the ocaml thread and the Objc threads can synchronize. Then I can for example allocate a buffer in Objc and export it to ocaml and the threads can communicate over the buffer using the locking as necessary. Or this might be packaged up a bit more nicely, but the locking and storage must be done on the Objc side. -Trevor