I have quite weird setup, where some file writes can take 300-500ms to create file. and im using FsaNodeSyncWorker to make all my FS operations sync writeFileSync, unlinkSync..
problem is that:
|
const sleepUntil = (condition: () => boolean, ms: number = 100) => { |
there is hardcoded 100ms, and that is not enough.
wold be nice if we could add SyncMessenger and on top of it in FsaNodeSyncAdapterWorker option to set this sleepUntil timeout duration.
if you like I can create PR, but from what I see that was intended just somehow left forgotten:
|
sleepUntil(() => int32[1] === 1); |
that is only place where this function is called, and it is called without second argument.
I have quite weird setup, where some file writes can take 300-500ms to create file. and im using
FsaNodeSyncWorkerto make all my FS operations syncwriteFileSync,unlinkSync..problem is that:
memfs/src/fsa-to-node/worker/SyncMessenger.ts
Line 7 in 1900071
there is hardcoded 100ms, and that is not enough.
wold be nice if we could add
SyncMessengerand on top of it inFsaNodeSyncAdapterWorkeroption to set thissleepUntiltimeout duration.if you like I can create PR, but from what I see that was intended just somehow left forgotten:
memfs/src/fsa-to-node/worker/SyncMessenger.ts
Line 49 in 1900071
that is only place where this function is called, and it is called without second argument.