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

Add a convenience wrapper for spawn-with-handle-for-killing #8160

Closed
bblum opened this issue Jul 31, 2013 · 1 comment
Closed

Add a convenience wrapper for spawn-with-handle-for-killing #8160

bblum opened this issue Jul 31, 2013 · 1 comment
Labels
A-concurrency Area: Concurrency related issues. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@bblum
Copy link
Contributor

bblum commented Jul 31, 2013

Spawning a child task with the ability to kill it at any moment by using a returned 'task handle' is not directly supported, but can be emulated by spawning an extra task into the child's taskgroup (supervised or unlinked, doesn't matter), and having that task do a select2 on (a) a kill signal port with the parent on the other end, and (b) an on-exit notify_port with the child on the other end.

@alexcrichton
Copy link
Member

Closing, we've decided to remove linked failure and kill propagation now happens at channel boundaries. You'd have to have the child task listening on a channel for a kill signal.

flip1995 pushed a commit to flip1995/rust that referenced this issue Jan 13, 2022
`manual_memcpy` fix

fixes rust-lang#8160

Ideally this would work with `VecDeque`, but the current interface is unsuitable for it. At a minimum something like `range_as_slices` would be needed.

changelog: Don't lint `manual_memcpy` on `VecDeque`
changelog: Suggest `copy_from_slice` for `manual_memcpy` when applicable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-concurrency Area: Concurrency related issues. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

2 participants