Skip to content

ChannelTask can be terminated#22

Open
Roba1993 wants to merge 2 commits into
paberr:mainfrom
Roba1993:terminate-worker
Open

ChannelTask can be terminated#22
Roba1993 wants to merge 2 commits into
paberr:mainfrom
Roba1993:terminate-worker

Conversation

@Roba1993

Copy link
Copy Markdown
Contributor

ChannelTask can be terminated and the whole worker is closed and removed from the pool. The pool will open a new worker afterwards. One ChannelTask is only allowed per WebWorker, so termination has no effect on other tasks.

This is needed for cases where the ChannelTask is running complex logic and spawn additional asynchronous functions endlessly or we don't want to answer to request anymore and close the ChannelTask.

Roba1993 added 2 commits June 12, 2026 14:18
ChannelTask can be terminated and the whole worker is closed and removed from the pool. The pool will open a new worker afterwards. One ChannelTask is only allowed per WebWorker, so termination has no effect on other tasks.
Termination only needs read var access, because the controlling moved to a cloneable struct. This allows to terminate the whole webworker from any place at any time.
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.

1 participant