Move control back to haxe thread without registering

Is it possible to move control from a thread created by a C++ library, back to a Haxe thread, without registering the foreign thread with the GC using SetTopOfStack? Ideally I just want the smallest thing I can do, push to a sync queue, trigger EventLoop, something like this that would move control back so haxe code can run where it belongs.

Sorry for the late reply, but one simple option is haxe.MainLoop.runInMainThread(myFunction). This assumes the C++ library has already called a Haxe function, and the problem is the Haxe function is running on the wrong thread. I’m not familiar with the GC, so I can’t help you with that part.