[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] ZeroMQ bindings with LuaJIT2 FFI support.
- From: Alex Bradbury <asb@...>
- Date: Sat, 19 Feb 2011 09:59:24 +0000
On 19 February 2011 06:42, Robert G. Jakabosky <firstname.lastname@example.org> wrote:
> The ZeroMQ  bindings  just got faster using LuaJIT2 FFI support.
> Another important feature of these new bindings is that they still work
> without FFI support, so the same .so module can be used with the standard Lua
> VM or with LuaJIT2. This hybrid module has been created with the help of my
> LuaNativeObjects  bindings generator. When the module loads and detects
> FFI support it will replace the normal C bindings with pure Lua code  that
> uses the FFI interface.
This looks really neat, and thanks for the benchmark.
One thing I noticed, unless I misread there's no gc hook for the
FFI-powered version to call zmq_close when the socket is garbage
collected. I think you need to create a userdata for each socket and
add a __gc hook there.