Skip to content

feat: reexport async_task::FallibleTask#113

Merged
notgull merged 1 commit intosmol-rs:masterfrom
jbr:reexport-fallible-task
Apr 11, 2024
Merged

feat: reexport async_task::FallibleTask#113
notgull merged 1 commit intosmol-rs:masterfrom
jbr:reexport-fallible-task

Conversation

@jbr
Copy link
Copy Markdown
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
Copy Markdown
Contributor

@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
Copy Markdown
Contributor Author

jbr commented Apr 11, 2024

Is that true even in case of task panic?

@notgull
Copy link
Copy Markdown
Contributor

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