Backport of all the multi-threading modernization (3.2)#45618
Merged
hpvb merged 5 commits intogodotengine:3.2from Feb 18, 2021
Merged
Backport of all the multi-threading modernization (3.2)#45618hpvb merged 5 commits intogodotengine:3.2from
hpvb merged 5 commits intogodotengine:3.2from
Conversation
2840b5a to
869b4b3
Compare
e499769 to
55f34a1
Compare
55f34a1 to
f10f4ae
Compare
- Based on C++14's `shared_time_mutex` - No more need to allocate-deallocate or check for null - No pointer anymore, just a member variable - Platform-specific implementations no longer needed - Simpler for `NO_THREADS`
f10f4ae to
ab5ab3c
Compare
hpvb
approved these changes
Feb 18, 2021
Member
hpvb
left a comment
There was a problem hiding this comment.
We discussed the alignment check, but since this already went into 4.0 I say merge this now. Then do a PR with the checks for both 4.0 and 3.2. Less work that way.
|
This breaks threading in C# again. |
This was referenced Mar 4, 2021
This was referenced Mar 10, 2021
This was referenced Mar 11, 2021
This was referenced Apr 27, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This a backport of all the multi-threading modernization and enhancements that exist currently for Godot 4.0.
It contains what was already in 4.0 before I started this modernization effort (like
Semaphore), plus everything else I've done for that version:Thread,Mutex, atomics, etc.Benefits:
volatilethat compilers are allowed to stop implementing.UPDATE: I've tested it myself with the TPS demo (going through all the workflow at the editor -importing everything, etc.) and a few other demo projects on Windows and Android.
This code is generously donated by IMVU.