You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: callback didn't executed with process.nextTick and setImmediate #30153
but console.log didn't show the log,and callback added by setTimeout works at the same time.
I read the source code,found some comment
// setImmediate and process.nextTick makes use of uv_check and uv_prepare to
// run the callbacks, however since we only run uv loop on requests, the
// callbacks wouldn't be called until something else activated the uv loop,
// which would delay the callbacks for arbitrary long time. So we should
// initiatively activate the uv loop once setImmediate and process.nextTick is
// called.
Is electron use different event loop from nodejs?
Any idea what's going on?
The settings you provided work.
I got this issue in my project,which's quiet large,and it happened occasionally.
I haven't find a reproducible sample yet.
I read the source code of nextTick and setImmediate,next time I got this problem,I will try to debug it in dev tool.Hope to provide more useful information.
Hi,I got this issue again.This is the new information I have:
Funtion “processImmediate” in internal/timers.js file, was not called when I called setImmediate in dev tool. It will be called when setImmediate works.
I thought maybe something was wrong in c++ code.Can I get this TraceEventScope data?like log in a file. I guess somehow this function return before it calls the immediate_callback_function.
Activity
koush commentedon Jul 17, 2021
I'm not sure if this is related, but I've similarly seen the renderer process failing to run the event loop until it is "jogged".
#27127
codebytere commentedon Jul 22, 2021
@dogeFu Tried running https://gist.github.com/c1877f611a01f9f9c56b5b8dd7de1ce3 on windows and cannot reproduce the bug. Can you please confirm that the bug is present with those settings or provide a reproducible sample yourself?
dogeFu commentedon Jul 23, 2021
The settings you provided work.
I got this issue in my project,which's quiet large,and it happened occasionally.
I haven't find a reproducible sample yet.
I read the source code of nextTick and setImmediate,next time I got this problem,I will try to debug it in dev tool.Hope to provide more useful information.
dogeFu commentedon Jul 26, 2021
Hi,I got this issue again.This is the new information I have:
Funtion “processImmediate” in internal/timers.js file, was not called when I called setImmediate in dev tool. It will be called when setImmediate works.
I thought maybe something was wrong in c++ code.Can I get this TraceEventScope data?like log in a file. I guess somehow this function return before it calls the immediate_callback_function.
bpasero commentedon Nov 26, 2021
This seems to reproduce even with Electron 16 and blocks our progress adopting newer Electron build or enabling process reuse.
//cc @deepak1556