Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using kill() does not fully reset state #119

Closed
reviewher opened this issue Apr 22, 2022 · 7 comments
Closed

using kill() does not fully reset state #119

reviewher opened this issue Apr 22, 2022 · 7 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@reviewher
Copy link

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

@reviewher reviewher added the bug Something isn't working label Apr 22, 2022
@ashish-r
Copy link
Contributor

ashish-r commented May 17, 2022

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

@ashish-r
Copy link
Contributor

Created the PR for fix here

@alewin @zant please review

@Arif-un
Copy link

Arif-un commented Aug 13, 2022

Still the same problem, any update on this issue?

@ghost
Copy link

ghost commented Aug 13, 2022 via email

@ashish-r
Copy link
Contributor

@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?

@sheron184
Copy link

Is this issue fixed?

@alewin alewin added this to the 4.1.0 milestone Oct 2, 2024
@alewin alewin moved this to Todo in useWorker TODOs Oct 2, 2024
@alewin
Copy link
Owner

alewin commented Oct 28, 2024

released [email protected] with the fixes ( #122 )
thanks @ashish-r

Apologies for the long wait, but due to personal and work-related reasons, I wasn’t able to maintain the library.
I’m well aware that forks and alternatives have emerged in the meantime, and I’m glad for it because the library was intentionally open-source with an MIT license to prevent issues like this.

Together with the new maintainer, @naorpeled, we are working to stabilize useWorker and add new features in the coming months. :)

@alewin alewin closed this as completed Oct 28, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in useWorker TODOs Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

6 participants