-
Notifications
You must be signed in to change notification settings - Fork 90
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
Fix wasm panic caused by a race condition in IotaDocument
and CoreDocument
#1258
Fix wasm panic caused by a race condition in IotaDocument
and CoreDocument
#1258
Conversation
Great that you tackled this! It might be an idea to include a typescript test that asserts an error is thrown in the scenario described in this comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I think that's the most reasonable way to deal with this.
If I do a Promise.all on multiple promises each of which does a createJws
(so an async read), that should be fine because it would use asynchronous rather than synchronous locking, right? That's how I understood #1150.
yes that's true. |
Description of change
fixes ##1150
This PR change the methods requiring read/write to be fallible if the lock is acquired to prevent uncontrolled crashes, since blocking is not supported for
RwLock
in wasm.