useWorker
useWorker copied to clipboard
using `kill()` does not fully reset state
https://github.com/alewin/useWorker/blob/master/packages/useWorker/src/useWorker.ts#L64
If the kill
method is called from user code, isRunning
is never reset and https://github.com/alewin/useWorker/blob/master/packages/useWorker/src/useWorker.ts#L149 error is tripped the next time the worker is used.
setWorkerStatus(WORKER_STATUS.ERROR)
or isRunning.current = false
in that spot fixes the problem
In this sorting example also, the kill functionality is not working.
The issue for kill functionality is in version 3 and version 4. It was working fine in version 2
@alewin @zant
Still the same problem, any update on this issue?
这是来自QQ邮箱的假期自动回复邮件。你好,我最近正在休假中,无法亲自回复你的邮件。我将在假期结束后,尽快给你回复。
@Arif-un this pr is still not merged.
@alewin @zant guys the PR is approved, anything I should change/take care of? If not can we please merge?
Is this issue fixed?