Skip to content

Mark worker as not running immediately after being killed#171

Merged
alewin merged 1 commit into
alewin:masterfrom
wanaryytel:mark-worker-as-not-running-immediately-after-termination
Mar 9, 2025
Merged

Mark worker as not running immediately after being killed#171
alewin merged 1 commit into
alewin:masterfrom
wanaryytel:mark-worker-as-not-running-immediately-after-termination

Conversation

@wanaryytel

Copy link
Copy Markdown
Contributor

This change is necessary so that the client could kill a worker and then immediately start a new worker. Without this change useWorker() will error out and say that you can only run one instance at a time because the running status is not updated until the next render cycle. If we mark it as not running immediately then the client can immediately create a new worker without having to wait for that to happen.

This change is necessary so that the client could kill a worker
and then immediately start a new worker. Without this change
`useWorker()` will error out and say that you can only run one
instance at a time because the running status is not updated
until the next render cycle. If we mark it as not running
immediately then the client can immediately create a new
worker without having to wait for that to happen.
@pkg-pr-new

pkg-pr-new Bot commented Mar 7, 2025

Copy link
Copy Markdown

Open in Stackblitz

npm i https://pkg.pr.new/alewin/useWorker/@koale/useworker@171

commit: 86454d6

@alewin

alewin commented Mar 9, 2025

Copy link
Copy Markdown
Owner

good catch @wanaryytel thanks

@alewin alewin merged commit d94ffe4 into alewin:master Mar 9, 2025
@github-actions github-actions Bot mentioned this pull request Mar 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants