We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 78799b2 commit 797d239Copy full SHA for 797d239
src/PromisifiedFS.js
@@ -83,6 +83,14 @@ module.exports = class PromisifiedFS {
83
this._initPromiseResolve();
84
this._initPromiseResolve = null;
85
}
86
+ // The next comment starting with the "fs is initially activated when constructed"?
87
+ // That can create contention for the mutex if two threads try to init at the same time
88
+ // so I've added an option to disable that behavior.
89
+ if (!options.defer) {
90
+ // The fs is initially activated when constructed (in order to wipe/save the superblock)
91
+ // This is not awaited, because that would create a cycle.
92
+ this.stat('/')
93
+ }
94
95
async _gracefulShutdown () {
96
if (this._operations.size > 0) {
0 commit comments