Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change emscripten_async_queue_on_thread_ to emscripten_dispatch_to_thread #411

Open
emilydolson opened this issue Feb 28, 2021 · 3 comments

Comments

@emilydolson
Copy link
Collaborator

There is a breaking change in emscripten where emscripten_async_queue_on_thread_ is now called emscripten_dispatch_to_thread. As a result, JSWrap.hpp does not currently compile with Emscripten 2.0.14. This is an easy fix, but it's technically also a breaking change for us (once we make it everyone will have to update their version of Emscripten), so we should do it at a time when that won't be a massive inconvenience.

More info: emscripten-core/emscripten@53fb2f6

@emilydolson
Copy link
Collaborator Author

Hmm, okay, just as a heads-up it might not be quite this simple. I don't know anything about pthreads, but it looks like when I do this swap proxy_pthread_id ends up being 0, which ends up throwing an assert error.

@mmore500
Copy link
Member

Switching that call is correct.

But there's some additional deep dark black magic I had to do to get compiling with the latest Emscripten, mostly this diff I think
https://github.com/devosoft/Empirical/pull/406/files#diff-7bb141adee82fb5248cd4b45554a7e52038aaf3cfdf3cadff5f1e5a44649f595R25

due to strange interactions between elements of Emscripten's compiler infrastructure (see emscripten-core/emscripten#11539)

Dishtiny is compiling off of Emscripten 2.05 (I pinned it last fall and have left it) on the Empirical native-canvas branch

When we merge that branch in, it should close this issue (but as you point out we'll have to make sure everyone's ok upgrading their Emscripten install)

@mmore500
Copy link
Member

Sorry I think that diff link to the deep dark might be broken, here's a better one

// temporary patch for https://github.com/emscripten-core/emscripten/issues/11539

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants