-
Notifications
You must be signed in to change notification settings - Fork 45
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
Concurrency Bugs #139
Comments
So there is a solution, but it's quite ugly and I don't really think we should implement it. It is as follows: First, use the Xorg still managed to crash for me when using the mutex protected functions (with a message of: @tomassedovic should I implement the static mutexes part, and leave the OS specific code out? Or do both? Neither? |
Thanks for looking into this! The solution does seem a bit heavy-handed, though :-(. I'm inclined to leave it as is, and just document the status quo. My understanding is that concurrency in gamedev is mostly for loading stuff in the background, tucking complex computations away, etc. And that on a lot of platforms, you can't even render or do input processing outside of the main thread. So I don't mind terribly if we just wontfix this -- especially if this boils down to OS-specific code. Doing static mutexes and not the OS-specific code doesn't sound good since it doesn't completely solve the issue. I'd say either both or neither. |
Yeah, both or neither was my idea too, but the OS specific code is pretty ugly, and even if we decide to do both it's still unclear how you should use it: we could tie it to console initialization, but that still makes it possible to have race conditions in |
Any of the following loops causes segfaults in safe code:
This is because we try to mutate global state from multiple threads, but the solution is not that apparent as in #137. Creating a separate object for the
Clipboard
might be feasible, but one for the cursor seems like a bit of an overkill.Also note that this is not a shortcoming of
libtcod
, the segfault actually comes back with OS specific code. This might just make this a wontfix, if there isn't a good solution.The text was updated successfully, but these errors were encountered: