Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: -- (:)
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.