Skip to content

Conversation

james7132
Copy link
Contributor

Addresses smol-rs/async-executor#149 at this crates' level. This removes the Schedule trait and requires a direct function pointer as a scheduling function. This is a usability regression, but it avoids the extra performance cost on all re-schedules. As an alternative to captured variables, a Task can instead embed the required scheduling information inside it's metadata.

This is a major breaking change and will require a major version bump on release.

james7132 and others added 7 commits September 10, 2025 02:24
```
warning: unnecessary parentheses around type
  --> examples/with-metadata.rs:77:11
   |
77 | ) -> impl (FnOnce(&'a DurationMetadata) -> MeasureRuntime<'a, F>) {
   |           ^                                                     ^
   |
   = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default
help: remove these parentheses
   |
77 - ) -> impl (FnOnce(&'a DurationMetadata) -> MeasureRuntime<'a, F>) {
77 + ) -> impl FnOnce(&'a DurationMetadata) -> MeasureRuntime<'a, F> {
   |
```
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