From: Olivier Andrieu <andrieu@ijm.jussieu.fr>
To: caml-list@inria.fr
Subject: [Caml-list] Threaded C code and callbacks
Date: Mon, 12 Aug 2002 19:24:09 +0200 [thread overview]
Message-ID: <15703.61241.869237.303066@akasha.ijm.jussieu.fr> (raw)
Hi,
There's a C library I'd like to interface with ocaml but it is
multithreaded. In the API, one can set some callbacks that are called
asynchronously. Of course, I'd like these callbacks to be caml
functions. The problem is that I cannot simply use `callback_exn'
because when the callback is triggered another caml thread may be
running ; callback_exn doesn't seem to check the mutex (or whatever)
that guarantees that only one caml thread is running.
I tried various hacks involving some mutex shared by caml and the C
stub code but it stills crashes at some point.
Any idea ? Or is this definitively impossible ? (I'm not very familiar
with the internal's of ocaml's threading machinery).
--
Olivier
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
reply other threads:[~2002-08-12 17:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=15703.61241.869237.303066@akasha.ijm.jussieu.fr \
--to=andrieu@ijm.jussieu.fr \
--cc=caml-list@inria.fr \
/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