@@ -3614,7 +3614,6 @@ class TsFn: public node::AsyncResource {
3614
3614
env(env_),
3615
3615
finalize_data(finalize_data_),
3616
3616
finalize_cb(finalize_cb_),
3617
- idle_running(false ),
3618
3617
call_js_cb(call_js_cb_ == nullptr ? CallJs : call_js_cb_),
3619
3618
handles_closing(false ) {
3620
3619
ref.Reset (env->isolate , func);
@@ -3779,8 +3778,6 @@ class TsFn: public node::AsyncResource {
3779
3778
} else {
3780
3779
if (uv_idle_stop (&idle) != 0 ) {
3781
3780
idle_stop_failed = true ;
3782
- } else {
3783
- idle_running = false ;
3784
3781
}
3785
3782
}
3786
3783
}
@@ -3813,14 +3810,12 @@ class TsFn: public node::AsyncResource {
3813
3810
}
3814
3811
3815
3812
void MaybeStartIdle () {
3816
- if (!idle_running) {
3817
- if (uv_idle_start (&idle, IdleCb) != 0 ) {
3818
- v8::HandleScope scope (env->isolate );
3819
- CallbackScope cb_scope (this );
3820
- CHECK (napi_throw_error (env,
3821
- " ERR_NAPI_TSFN_START_IDLE_LOOP" ,
3822
- " Failed to start the idle loop" ) == napi_ok);
3823
- }
3813
+ if (uv_idle_start (&idle, IdleCb) != 0 ) {
3814
+ v8::HandleScope scope (env->isolate );
3815
+ CallbackScope cb_scope (this );
3816
+ CHECK (napi_throw_error (env,
3817
+ " ERR_NAPI_TSFN_START_IDLE_LOOP" ,
3818
+ " Failed to start the idle loop" ) == napi_ok);
3824
3819
}
3825
3820
}
3826
3821
@@ -3923,7 +3918,6 @@ class TsFn: public node::AsyncResource {
3923
3918
napi_env env;
3924
3919
void * finalize_data;
3925
3920
napi_finalize finalize_cb;
3926
- bool idle_running;
3927
3921
napi_threadsafe_function_call_js call_js_cb;
3928
3922
bool handles_closing;
3929
3923
};
0 commit comments