GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — n-api: remove idle_running from TsFn · nodejs/node@609ae33

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src
    • node_api.cc
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/node_api.cc‎

Copy file name to clipboardExpand all lines: src/node_api.cc
+6-12Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3717,7 +3717,6 @@ class TsFn: public node::AsyncResource {
37173717
env(env_),
37183718
finalize_data(finalize_data_),
37193719
finalize_cb(finalize_cb_),
3720-
idle_running(false),
37213720
call_js_cb(call_js_cb_ == nullptr ? CallJs : call_js_cb_),
37223721
handles_closing(false) {
37233722
ref.Reset(env->isolate, func);
@@ -3879,8 +3878,6 @@ class TsFn: public node::AsyncResource {
38793878
} else {
38803879
if (uv_idle_stop(&idle) != 0) {
38813880
idle_stop_failed = true;
3882-
} else {
3883-
idle_running = false;
38843881
}
38853882
}
38863883
}
@@ -3913,14 +3910,12 @@ class TsFn: public node::AsyncResource {
39133910
}
39143911

39153912
void MaybeStartIdle() {
3916-
if (!idle_running) {
3917-
if (uv_idle_start(&idle, IdleCb) != 0) {
3918-
v8::HandleScope scope(env->isolate);
3919-
CallbackScope cb_scope(this);
3920-
CHECK(napi_throw_error(env,
3921-
"ERR_NAPI_TSFN_START_IDLE_LOOP",
3922-
"Failed to start the idle loop") == napi_ok);
3923-
}
3913+
if (uv_idle_start(&idle, IdleCb) != 0) {
3914+
v8::HandleScope scope(env->isolate);
3915+
CallbackScope cb_scope(this);
3916+
CHECK(napi_throw_error(env,
3917+
"ERR_NAPI_TSFN_START_IDLE_LOOP",
3918+
"Failed to start the idle loop") == napi_ok);
39243919
}
39253920
}
39263921

@@ -4023,7 +4018,6 @@ class TsFn: public node::AsyncResource {
40234018
napi_env env;
40244019
void* finalize_data;
40254020
napi_finalize finalize_cb;
4026-
bool idle_running;
40274021
napi_threadsafe_function_call_js call_js_cb;
40284022
bool handles_closing;
40294023
};

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.