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

Investigate task.take() #57

Open
pictographer opened this issue Jul 27, 2022 · 0 comments
Open

Investigate task.take() #57

pictographer opened this issue Jul 27, 2022 · 0 comments

Comments

@pictographer
Copy link
Contributor

    pub async fn finalize(&mut self) {
        // Stop waiting for an interrupt.
        self.handle.close();

        // TODO This is here to mimic the example in the documentation, but
        // it doesn't seem to make any difference whether or not it's here. Why?
        // https://docs.rs/signal-hook-async-std/latest/signal_hook_async_std/
        if let Some(task) = &mut self.task.take() {
            task.await
        }
    }
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

No branches or pull requests

1 participant