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 anywhere.
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.
--f