py-sdl2 icon indicating copy to clipboard operation
py-sdl2 copied to clipboard

Any support for SDL_CreateThread?

Open zeroxer opened this issue 3 years ago • 1 comments

Would PySDL2 support SDL_CreateThread()?

zeroxer avatar Dec 24 '21 16:12 zeroxer

@zeroxer Sorry for the slow reply, I've been busy over the holiday! Looking at the pysdl2 source the function isn't currently wrapped (nothing from the SDL_thread.h header has Python bindings).

It would be easy enough to add that function, but I honestly have no clue how it would behave given Python's threading model (would need thorough testing). What are you hoping to do with SDL_CreateThread that you couldn't with Python's multithreading/multiprocessing functions? If you have a specific simple use-case I could try it out.

a-hurst avatar Jan 02 '22 23:01 a-hurst

Closing this due to inactivity, but please let me know if you'd like this reopened!

a-hurst avatar Sep 03 '22 16:09 a-hurst

Shared objects between contexts doesn't seem to work with Python threads, so I wanted to try the SDL thread management system.

rayzchen avatar Jun 04 '23 19:06 rayzchen