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
De-SDL voodoo threading #2568
De-SDL voodoo threading #2568
Conversation
12fa18a
to
eda428a
Compare
eda428a
to
9003b6d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest adding a couple unit tests to exercise it.
The rwqueue has a couple test cases that access a queue using multiple threads, I think this would be a good template to use here too.
9003b6d
to
502e1f9
Compare
Migrate all SDL threading-related code to C++17. Add a simple semaphore implementation to replace SDL's semaphore.
502e1f9
to
e98b469
Compare
I put a very basic unit test in there, will try to get more creative if desired. |
P.S. I consider the semaphore class a short-term hack until we can use C++20's |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, @kklobe!
Merging shortly after I can get a couple positive tests completed on my side.
Nice to have an all C++17 implementation, @kklobe ! |
Migrate all Voodoo SDL threading-related code to C++17. Add a simple semaphore implementation to replace SDL's semaphore.
Mostly this is just an excuse for me to get a bit more experience with C++ threading; I didn't notice any tangible performance benefits.