-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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,worker: add isInternalWorker #56469
base: main
Are you sure you want to change the base?
Conversation
Might close nodejs/import-in-the-middle/issues/38 |
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.
Nicely done!
Maaaybe for consistency with isMainThread
, the name should actually be isInternalThread
(sorry, I was the one who originally told said isInternalWorker
).
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #56469 +/- ##
==========================================
- Coverage 88.53% 88.52% -0.02%
==========================================
Files 657 660 +3
Lines 190761 190898 +137
Branches 36616 36626 +10
==========================================
+ Hits 168899 168996 +97
- Misses 15048 15089 +41
+ Partials 6814 6813 -1
|
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.
nearly there! 🙌
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 😁 hopefully @bengl can confirm it does what he needs.
This PR adds an
isInternalWorker
tonode:worker_threads
similar toisMainThread
but to detect if the thread is an instance ofInternalWorker