-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
src: add web locks api #58666
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
src: add web locks api #58666
Conversation
|
Review requested:
|
370462f to
ba53a01
Compare
ba53a01 to
5d52680
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #58666 +/- ##
==========================================
- Coverage 90.09% 90.02% -0.07%
==========================================
Files 645 648 +3
Lines 189930 190815 +885
Branches 37217 37392 +175
==========================================
+ Hits 171125 171790 +665
- Misses 11512 11674 +162
- Partials 7293 7351 +58
🚀 New features to boost your workflow:
|
5d52680 to
6fdd577
Compare
mcollina
left a 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.
lgtm
Ethan-Arrowood
left a 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.
this lgtm. I looked through the WPT and other tests and they look all good. I reviewed the JS api to make sure it aligns with expectations and analyzed its source. All is good for a first implementation. I did a cursory review of the C++ part as I'm less experienced there, but in general it looks okay too. Nice work!
|
Adding
semver-major
|
|
|
|
Yeah, been noticing that. Let's mark it flaky. @IlyasShabi do you think you'd be able to investigate? |
|
This doesn't land cleanly on |
This PR implements the Web Locks API, Locks are used to coordinate access to shared resources across multiple threads.
This implementation is based on previous work in #22719 and #36502, but takes a C++ native approach for better performance and reliability, this solution uses a singleton
LockManagerwith thread-safe data structures to coordinate locks across all workers.exclusiveandsharedmodesstealoptionifAvailableoptionsignaloptionquery.https.any.jstests as unit testsCloses: #22702
Refs: https://w3c.github.io/web-locks