Re: Any established library for background worker threads?

  • From: Mike Pall <mike-1309@xxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Tue, 10 Sep 2013 16:37:31 +0200

Alex wrote:
> (Unless maybe you generate the main thread FFI callback on the VM created
> for the thread, so that the states remain separated. But I'm not sure how
> you would get a pointer to that on the parent thread, since there is no C
> API for the FFI. Maybe lightuserdata functions will work on FFI pointers?)

//www.freelists.org/post/luajit/How-to-create-another-lua-State-in-pthread,8

[Note: the original code is suboptimal, but it shows the basic idea.]

--Mike

Other related posts: