Question: how to handle long running processes?
未關閉
question
- 主要語言
- TypeScript
- 星號
- 3.5k
- 分支
- 173
- PR 合併指標
- 30 天內沒有已合併 PR
描述
I'm just wondering what the recommended way is to tackle the following problem:
I have a long running external process (python) that waits for stdin and outputs on stdout. It doesn't restart every time because the overhead would be far longer than the execution time. I want to launch this process 16 times with `child_process.spawn`.
Now I'm not sure how I achieve this with Threads, because so far I've only used it with short running processes that exit when done.
I tried to create the process outside the scope in the file where my `expose` function is, but that ends up with all workers sharing the same child process globally.
Any suggestions?
貢獻指南
這個儲存庫沒有索引到貢獻指南
評估
這個 Issue 還沒有評估資料。