andywer / andywer/threads.js

Ability to specify worker_threads/tinyworker

未关闭
#229 21 条评论 3 个 reaction 已指派 0 人 在 GitHub 查看
enhancement
主要语言
TypeScript
星标
3.5k
派生
173
PR 合并指标
30 天内没有已合并 PR

描述

Hello, I hope you are having a nice day (Stay safe!)

Would it be possible to make a pre-launch option where you could specify the method of spawning (but only for certain workers/pools ?)
Apparently, some modules like the canvas module are **not context aware** and therefore its impossible for me to use worker_threads... But then again I don't want to use child_processes for all pools/workers. Can *spawning a certain pool using tinyworker without touching the other pools* be possible without major changes?

PS: I'm on node12 but I had to make tweaks to force threads.js to use tiny-worker module but then again, all my stuff are now using child processes and consuming A LOT of resources.

If you have another advice I should use to combat the "non context aware" issue, I would love to hear it. Thanks a lot once again :D

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。