Skip to content

Commit 6445ba9

Browse files
committed
fixup
Signed-off-by: Paolo Insogna <[email protected]>
1 parent 3019ab6 commit 6445ba9

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

doc/api/worker_threads.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,8 @@ If this is used in the main thread, its value is an empty object.
660660
added: REPLACEME
661661
-->
662662
663+
> Stability: 1 - Experimental
664+
663665
* Returns: {Array<bigint>} A list of notifications registered in the current thread.
664666
665667
Return the list of all notifications registered in the current thread via
@@ -671,6 +673,8 @@ Return the list of all notifications registered in the current thread via
671673
added: REPLACEME
672674
-->
673675
676+
> Stability: 1 - Experimental
677+
674678
* `callback` {Function} A function to execute when the notification is received.
675679
* Returns: {bigint} The notification ID
676680
@@ -715,6 +719,12 @@ new Worker('process.env.SET_IN_WORKER = "foo"', { eval: true, env: SHARE_ENV })
715719
716720
## `worker.sendNotification(id)`
717721
722+
<!-- YAML
723+
added: REPLACEME
724+
-->
725+
726+
> Stability: 1 - Experimental
727+
718728
* `id` {bigint}: The notification ID
719729
720730
Triggers the notification previously registered via [`worker.registerNotification(callback)`](#workerregisternotificationcallback).
@@ -777,6 +787,8 @@ On the corresponding worker object (if there is any), it is available as [`worke
777787
added: REPLACEME
778788
-->
779789
790+
> Stability: 1 - Experimental
791+
780792
* `id` {number}
781793
782794
Unregister a notification previously registered with [`worker.registerNotification(callback)`](#workerregisternotificationcallback).
@@ -790,6 +802,8 @@ worker thread that registered it.
790802
added: REPLACEME
791803
-->
792804
805+
> Stability: 1 - Experimental
806+
793807
Unregister all the notifications previously registered with [`worker.registerNotification(callback)`](#workerregisternotificationcallback).
794808
795809
## `worker.workerData`

src/node_worker.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1399,8 +1399,8 @@ void NotificationData::Execute() {
13991399
this->env_->SetImmediate(
14001400
[this](Environment* env) {
14011401
v8::Isolate* isolate = this->env_->isolate();
1402-
this->callback_.Get(isolate)->Call(
1403-
isolate->GetCurrentContext(), Null(isolate), 0, nullptr);
1402+
USE(this->callback_.Get(isolate)->Call(
1403+
isolate->GetCurrentContext(), Null(isolate), 0, nullptr));
14041404
},
14051405
CallbackFlags::kUnrefed);
14061406
}

0 commit comments

Comments
 (0)