Hello, I sent a question to caml-list a few days ago, but there is no reply yet. So let me explain my question in detail. I have a C program and I'll try to rewrite some libraries of them in OCaml. The C program runs in multithreads, so the OCaml library will be called by multithread. In order to avoid two threads running the OCaml part at one time, I'll try insert a code to acquire mutex lock in the C function before calling the OCaml function. But I'm not sure that is enough to run the program safely. Does anyone know about it ? Please give me some advise about multithreading or how to incorporate OCaml into C program. Best regards, Masateru Kawaguchi 2015-03-05 11:31 GMT+09:00 Masateru Kawaguchi : > Hello, > > I'm implementing a C function that calls an OCaml function. > > If the C function is called by multithreads, the OCaml function works fine > ? > Is that all right when the C function uses mutual exclusion locks ? > > Best regards, > Masateru Kawaguchi > >