-
Notifications
You must be signed in to change notification settings - Fork 17
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
Static creation of mutexes #3
Comments
I think this would be nice to have, but there are some difficulties not related to the general We might be able to switch to using |
Ah, the problem is that statically initialized mutexes are reentrant, which is unsound in Rust. So, I do not see a good way to support I suppose we could change the mutex implementation on POSIX to a lazy initialization scheme: Use some dummy value in an Essentially, if you want this, I propose you try to get rid of EDIT: Oh, the Windows thing is simpler. That's just lazy detection of which kind of lock to use. On POSIX, whoever gets second in the race to initialize would have to spin waiting until the first thread completed initialization. |
This seems like an issue for the main project repo, and anyway has been implemented in the mean time, so I think we can close this. (Thanks to the person who noted this, even though for some reason they deleted their message again.) |
I haven't been following the constant-evaluation work, but wanted to check that this is on the agenda?
The text was updated successfully, but these errors were encountered: