Skip to content

feat: reexport async_task::FallibleTask #113

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

Merged
merged 1 commit into from
Apr 11, 2024

Conversation

jbr
Copy link
Contributor

@jbr jbr commented Apr 11, 2024

Motivation: FallibleTask is part of the public interface of this crate, in that Task::fallible returns FallibleTask. However, in order to name that type, users need to add a direct dependency on async_task and ensure the crates versions are compatible. Reexporting allows crate users to name the type directly.

Thanks!

Copy link
Member

@notgull notgull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

I'm a little tempted to not provide it, since the task scheduler in this case is infallible. However I guess it's part of the public API whether we like it or not.

@notgull notgull merged commit df57d9b into smol-rs:master Apr 11, 2024
@jbr
Copy link
Contributor Author

jbr commented Apr 11, 2024

Is that true even in case of task panic?

@notgull
Copy link
Member

notgull commented Apr 11, 2024

When the task panics the panic is caught and later propagated to the task that is polling the Task handle.

@notgull notgull mentioned this pull request Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants