[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Trevor Jim <trevor@r...> |
| Subject: | Re: [Caml-list] calling ocaml from threaded C program |
Thanks. Maybe someone on the list has some experience and could contribute some advice... What I have is a long-running ocaml thread, invoked from Objc, and I would like to have other Objc threads running that report on the progress of the ocaml thread, etc. That means communication between the ocaml thread and the Objc threads, which I now know cannot occur using most functions of the ocaml C api. So any advice on the best way to communicate between these threads? I am guessing I need to having locking implemented in Objc and exported to ocaml, then both the ocaml thread and the Objc threads can synchronize. Then I can for example allocate a buffer in Objc and export it to ocaml and the threads can communicate over the buffer using the locking as necessary. Or this might be packaged up a bit more nicely, but the locking and storage must be done on the Objc side. -Trevor