Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Trevor Jim <trevor@research.att.com>
To: Markus Mottl <markus.mottl@gmail.com>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] calling ocaml from threaded C program
Date: Mon, 08 Jan 2007 17:15:06 -0500	[thread overview]
Message-ID: <45A2C26A.8000506@research.att.com> (raw)
In-Reply-To: <f8560b80701081321j62e75ae2se4d3f517c2c45944@mail.gmail.com>

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


      reply	other threads:[~2007-01-08 22:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-08 19:40 Trevor Jim
2007-01-08 21:21 ` [Caml-list] " Markus Mottl
2007-01-08 22:15   ` Trevor Jim [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45A2C26A.8000506@research.att.com \
    --to=trevor@research.att.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=markus.mottl@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox