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
Copy file name to clipboardExpand all lines: packages/mongodb-memory-server-core/src/util/utils.ts
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -112,7 +112,7 @@ export async function killProcess(childprocess: ChildProcess, name: string): Pro
112
112
*/
113
113
exportfunctionisAlive(pid: number): boolean{
114
114
try{
115
-
process.kill(pid,0);
115
+
process.kill(pid,0);// code "0" dosnt actually kill anything (on all supported systems)
116
116
117
117
returntrue;
118
118
}catch(err){
@@ -121,11 +121,11 @@ export function isAlive(pid: number): boolean {
121
121
}
122
122
123
123
/**
124
-
* Call "setImmediate" to ensure an function is exectued on next event loop
125
-
* look at the following link to get to know on why this needed: https://snyk.io/blog/nodejs-how-even-quick-async-functions-can-block-the-event-loop-starve-io/
124
+
* Call "process.nextTick" to ensure an function is exectued directly after all code surrounding it
125
+
* look at the following link to get to know on why this needed: https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#process-nexttick (read full documentation)
0 commit comments