MCPcopy Create free account
hub / github.com/FSGModding/FSG_Mod_Assistant / #startThreads

Method #startThreads

lib/modCheckLib.js:629–644  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

627 }
628
629 #startThreads() {
630 this.#threadPool.length = 0
631 this.#threadPoolCount = 0
632 this.#threadCurrent = 0
633
634 for ( let idx = 1; idx <= this.#threadPoolMax; idx++ ) {
635 const thisThread = cp.fork(path.join(__dirname, 'queueRunner.js'), [
636 idx
637 ])
638 this.#threadPoolIdx.add(idx-1)
639 this.#threadPoolCount++
640 thisThread.on('message', (m) => { this.#workQueueResponse.apply(this, [m]) })
641 thisThread.on('exit', (m) => { this.#workQueueDone.apply(this, [m, idx-1]) })
642 this.#threadPool.push(thisThread)
643 }
644 }
645
646 #exitThreads() {
647 for ( const idx of this.#threadPoolIdx ) {

Callers 1

processModsMethod · 0.95

Calls 2

applyMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected