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

Function doConcurrentAsyncOps

test/parallel/test-fs-opendir.js:273–281  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

271
272// Check that concurrent read() operations don't do weird things.
273async function doConcurrentAsyncOps() {
274 const dir = await fs.promises.opendir(testDir);
275 const promise1 = dir.read();
276 const promise2 = dir.read();
277
278 assertDirent(await promise1);
279 assertDirent(await promise2);
280 dir.closeSync();
281}
282doConcurrentAsyncOps().then(common.mustCall());
283
284// Check that concurrent read() + close() operations don't do weird things.

Callers 1

test-fs-opendir.jsFile · 0.85

Calls 4

assertDirentFunction · 0.85
opendirMethod · 0.80
readMethod · 0.45
closeSyncMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…