Closed hoodmane closed 8 months ago
Thanks for the fix! Unless I'm mistaken, Emscripten doesn't support fork() anyway and has got no way of supporting it in the future. That makes the reasoning for using the custom malloc_closure.h
not apply (in the comment a few lines above your changes).
Thanks for the quick merge @arigo!
Unless I'm mistaken, Emscripten doesn't support fork() anyway
Actually, it does support threads: https://emscripten.org/docs/porting/pthreads.html I don't think the issues apply here anyways, and I always do single threaded builds so I guess someone else can investigate if they are concerned...
Yes, threads are fine. The issue with libffi on Linux comes from calling fork(), which is its own different beast.
Emscripten has a libffi port and
malloc_closure.h
won't work without significant extra work in Emscripten so use the libffi implementation.