diagnostics_channel: add diagnostics channels for web locks#62123
Open
IlyasShabi wants to merge 1 commit intonodejs:mainfrom
Open
diagnostics_channel: add diagnostics channels for web locks#62123IlyasShabi wants to merge 1 commit intonodejs:mainfrom
IlyasShabi wants to merge 1 commit intonodejs:mainfrom
Conversation
c92cc75 to
8ce0c9b
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #62123 +/- ##
==========================================
+ Coverage 88.84% 89.63% +0.79%
==========================================
Files 674 676 +2
Lines 204957 206396 +1439
Branches 39309 39532 +223
==========================================
+ Hits 182087 184997 +2910
+ Misses 15088 13524 -1564
- Partials 7782 7875 +93
🚀 New features to boost your workflow:
|
legendecas
reviewed
Mar 6, 2026
| * `mode` {string} The lock mode: `'exclusive'` or `'shared'`. | ||
|
|
||
| Emitted when `ifAvailable` is `true` and the lock is not immediately available. | ||
| The callback is invoked with `null` instead of a `Lock` object. |
Member
There was a problem hiding this comment.
This channel callback has no parameter of Lock. What is this callback referring to?
Member
Author
There was a problem hiding this comment.
Im referring to the user land callback passed to locks.request() not to the subscriber itself.
Qard
approved these changes
Mar 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds diagnostics channels support for
locks.request()giving visibility into the lock request lifecycle.Four channels are emitted:
locks.request.startwhen a request beginslocks.request.grantwhen the lock is grantedlocks.request.misswhen the lock is not immediately availablelocks.request.endwhen the request finishes