English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Co-existing with non OCaml threads
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-05-12 (00:29)
From: Francois Rouaix <francois.rouaix@g...>
Subject: Co-existing with non OCaml threads
I'm contemplating writing an OCaml interface for a C++ middleware library
that my company develops and uses internally. Typically this middleware will
start an event loop on a thread in the background, leaving the application
responsible for its own threads (and potentially using none and having its
own code running entirely on events within the eventloop thread).
How's this likely to be compatible with OCaml use of native threads (this is
on Linux by the way)?
The manual section for interfacing with C isn't mentionning threads
Should Caml code be restricted to run on threads it has created? Or can it
run on any threads?
How can I synchronize between a thread running C++ code and a thread running
OCaml code (i.e. both communicating on a message queue)?
Thanks for any suggestions.