-
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
Clarify the behavior of wgpuInstanceWaitAny
called from a callback
#360
Comments
Thinking on this further, I think it's necessary to make this safe. Sure, we could say it's unsafe to
If those things have to be safe then nested WaitAny may as well have to be re-entrancy-safe too (for both single-threaded nesting and for multithreading). |
OTOH they don't necessarily have to be safe. There just would be no way to do them safely. |
FWIW, I think However, we still have issues with re-entrancy for device level stuff because of the default global Device lock... If/when we have a separate thread for doing stuff, I think we can defer certain spontaneous callbacks, i.e. Device lost, and that might allow re-entrancy? Would need to think a little more about whether that could work though. |
Ah, I didn't think about the fact that there can be things that are safe in multithreaded code but will cause deadlocks in nested code.... |
Dec 12 meeting:
|
Docs change only. |
Question about
WGPUFuture
s: Is it legal to callwgpuInstanceWaitAny
from within a callback, and if so, what completion status is reported for theWGPUFuture
of the callback we are currently in?(EDIT: parent issue #199)
FTR, replies got on matrix:
The text was updated successfully, but these errors were encountered: