Let me know @ceifa if you'd like this broken down into parts. These are the last of the changes in my private fork and I can appreciate you may not want to upstream all of them.
Support timing out callbacks from JS into Lua
Made calling functions from JS into Lua more robust. Previously there was a failure cause where if you created a thread, had that thread return a function, close the thread and attempt to call the function it would try to call the Lua function from within the context of a closed thread. All function calls from JS into Lua now use there own individual calling thread as Lua does when calling C functions and those threads are within a thread only used for functions within the Lua reference registry. This had an interesting side-effect that setInterval blocked the tests from completing because it no longer silently errored.
Inject null type
Protect against unable to allocate memory for thread creation
Let me know @ceifa if you'd like this broken down into parts. These are the last of the changes in my private fork and I can appreciate you may not want to upstream all of them.