[zeromq-dev] Introducing Caravan: Simple, Faithful ZMQ-Bindings for Objective Caml (Pedro Borges)
Guillaume Yziquel
guillaume.yziquel at citycable.ch
Mon Apr 4 15:07:50 CEST 2011
Le Monday 04 Apr 2011 à 13:24:17 (+0100), Pedro Borges a écrit :
> On Mon, Apr 4, 2011 at 12:31 PM, Guillaume Yziquel
> <guillaume.yziquel at citycable.ch> wrote:
> > Le Monday 04 Apr 2011 à 12:17:01 (+0100), Pedro Borges a écrit :
>
> > You also the cute caml_register_generational_global_root function if you want buffers
> > that are sort of fixed.
>
> That approach looks promising.
I've been using that at one point in time to feed OCaml closures to a
C++ constructor, construct a private member holding a generational
global root of arrays of these closures, and inheriting the base
virtual class to implement member function calling back the closures in
the array. It worked. So I guess it could fit the bill for your work as
these generational global roots seem compatible with callbacks.
(Well, it almost worked: I was using Lwt, and unix calls from the C++
code were interrupted by POSIX signals scheduled by Lwt to implement
non-blocking system calls... for the story. But that has nothing to do
with the above paragraph.)
--
Guillaume Yziquel
More information about the zeromq-dev
mailing list