Bound of UncapturedErrorHandler
is more restrictive than it should be
#5395
Labels
UncapturedErrorHandler
is more restrictive than it should be
#5395
The definition of
UncapturedErrorHandler
, the callback given toDevice::on_uncaptured_error()
, is an alias forThe combination of
Fn
,Send
, and noSync
is weird. I believe that it should be replaced with either:implying that the callback could be called simultaneously from multiple threads, where it currently cannot*, or
allowing the callback to take advantage of not being called simultaneously. This is not a soundness issue, just an unnecessary empty space in between what is permitted for wgpu and what is permitted for its callers.
* Say, what happens if the uncaptured error handler itself performs a wgpu operation that errors? Deadlock? Possibly the error handler ought to be in an
Arc
so it can be called outside the lock.The text was updated successfully, but these errors were encountered: