-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Update some of NativeAOT's uses of Lock to use non-alertable waits #97105
Comments
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsBased on discussion in #94873. Alertable waits can be overridden by SynchronizationContext, are interruptible, and can be reentrant on some threads. Update some low-level uses of Lock such as in class construction to use non-alertable waits.
|
- Added an internal constructor that enables the lock to use non-alertable waits - Non-alertable waits are not forwarded to `SynchronizationContext` wait overrides, are non-message-pumping waits, and are not interruptible - Updated most of the uses of `Lock` in NativeAOT to use non-alertable waits - Also simplified the fix in dotnet#94873 to avoid having to do the relevant null checks in various places along the wait path, by limiting the scope of the null checks to the initialization phase Fixes dotnet#97105
…7227) * Add an internal mode to `Lock` to have it use trivial (non-alertable) waits - Added an internal constructor that enables the lock to use trivial waits - Trivial waits are non-alertable waits that are not forwarded to `SynchronizationContext` wait overrides, are non-message-pumping waits, and are not interruptible - Updated most of the uses of `Lock` in NativeAOT to use trivial waits - Also simplified the fix in #94873 to avoid having to do the relevant null checks in various places along the wait path, by limiting the scope of the null checks to the initialization phase Fixes #97105
Reverted by #98867 |
Based on discussion in #94873. Alertable waits can be overridden by SynchronizationContext, are interruptible, and can be reentrant on some threads. Update some low-level uses of Lock such as in class construction to use non-alertable waits.
The text was updated successfully, but these errors were encountered: