Skip to content
Discussion options

You must be logged in to vote

Short answer: yes, if you lock the mutex of the object you're using, you will (should) be fine. Examples for world, local_player and entity_manager.

Long answer: the thread safety thing is quite old and I'd like to work on it someday (at least add some comments to the functions so it's clear that you should or not lock the corresponding mutex before calling it). It's nevertheless safe in the sense that all library internal calls lock the mutexes before doing stuff. However, it's not obvious when you should lock or not. For example, the EntityManger::AddEntity function already lock the mutex on its own (you shouldn't have to call this function except if you do something really exotic). Sim…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by folkertvanheusden
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #74 on February 09, 2022 23:10.