MCPcopy Index your code
hub / github.com/nodejs/node / afterWrite

Function afterWrite

benchmark/fs/writefile-promises.js:77–90  ·  view source on GitHub ↗
(er)

Source from the content-addressed store, hash-verified

75 }
76
77 function afterWrite(er) {
78 if (er) {
79 throw er;
80 }
81
82 writes++;
83 const benchEnded = Date.now() >= endAt;
84
85 if (benchEnded && ++waitConcurrent === concurrent) {
86 stop();
87 } else if (!benchEnded) {
88 write();
89 }
90 }
91
92 for (let i = 0; i < concurrent; i++) write();
93}

Callers 1

writeFunction · 0.70

Calls 3

nowMethod · 0.80
stopFunction · 0.70
writeFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…