piscinajs / piscina

A fast, efficient Node.js Worker Thread Pool implementation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

throw error with histogram

wszgrcy opened this issue · comments

commented

image
I use piscina with electron .In my develop computer, It works well.but when I build and run in virtual box (win 10 22h2 new system),code run 2~3s and throw err I add try ... catch in my code but Error still reported
If I add console in my worker.js, It also works well..... Piscina instance as follow

  get pinyinWorker() {
    if (!this.#pinyinWorker) {
      this.#pinyinWorker = new Piscina({
        filename: path.join(__dirname, 'worker', 'worker.js'),
        minThreads: 2,
        maxThreads: 4,
        idleTimeout: 120_000,
      });
    }
    return this.#pinyinWorker;
  }

Hi, @wszgrcy Is this stills valid?