SDL2 and threads? #16212
Replies: 2 comments 1 reply
-
There is also a version showing the same problem using C instead of Rust. That code is over at c_example/. See the Makefile for various targets, and try running
...and the error message:
|
Beta Was this translation helpful? Give feedback.
-
I am not sure if that PR you linked (emscripten-ports/SDL2#127) has landed in upstream SDL - if it has, then it should be included already since we switched to upstream. @Daft-Freak do you know? If we still need those fixes then they'd need to be done in upstream now. |
Beta Was this translation helpful? Give feedback.
-
Just wondering what the latest thinking on running SDL2 and threads with emscripten and asyncify and proxy-to-pthread. I have a simple rust example program that fails at runtime with the following exception:
...that message occurs after the first trip through the event loop, so everything has been initialized "successfully". The program is just compiled with pthread support, it doesn't actually spawn any additional threads. So I'm wondering if it has something to do with the proxy-to-pthread option. My ultimate goal is to use threads for accelerating a complex computation, not to interact with SDL in a threaded manner.
Options currently in use:
...it seems like there has been some work on SDL and threads previously: [WIP] SDL2 thread proxying fixes #127.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions