caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] React wrappers for C++ code and OCaml threads
@ 2014-12-09 17:31 Kakadu
  0 siblings, 0 replies; only message in thread
From: Kakadu @ 2014-12-09 17:31 UTC (permalink / raw)
  To: Caml List

Hello,

I have a C++ code and OCaml one in the same application. Ocaml will
spawn many OCaml threads. Also I have global C++ object with a number
of fields and I want to catch when these fields' values are changing.
On every change I want to emit ocaml-react signal associated with a
field. OCaml threads will subscribe to signals and do some work after
receiving them.

So, the whole app is going to have these threads:
1) C++ thread with Qt event loop
2) OCaml thread with event loop which will monitor changes in global
C++ object. Also it will emit OCaml-react signals
3) Many OCaml worker threads which will do something useful.

This design is a little bit scary for me. Will it work and can I do
something better without abandoning C++ code? Have you ever wrapped
C++ objects into OCaml event like I need?

Kind regards,
Kakadu


P.S. My C++ object doesn't have Qt properties with Qt signals, it has
only fields. And that
s why I need another event loop.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-12-09 17:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-09 17:31 [Caml-list] React wrappers for C++ code and OCaml threads Kakadu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).