Skip to content

feat: add Sleeper based on futures-timer#154

Merged
Xuanwo merged 3 commits intoXuanwo:mainfrom
NumberFour8:feature/add-futures-timer
Dec 27, 2024
Merged

feat: add Sleeper based on futures-timer#154
Xuanwo merged 3 commits intoXuanwo:mainfrom
NumberFour8:feature/add-futures-timer

Conversation

@NumberFour8
Copy link
Copy Markdown
Contributor

@NumberFour8 NumberFour8 commented Oct 17, 2024

What

This PR adds the new FuturesTimerSleep implementation of a Sleeper which is based on the https://docs.rs/futures-timer/latest/futures_timer/ crate.

This timer is runtime agnostic and also works in WASM environments and is gated via futures-timer-sleep feature (enabled per default).

Closes #153

Copy link
Copy Markdown
Owner

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

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

Thank you for your PR. But I prefer to keep gloo-timers feature as is and only add a new feature for futures-timer.

@NumberFour8
Copy link
Copy Markdown
Contributor Author

Thanks for the comments. I will improve it.

@NumberFour8
Copy link
Copy Markdown
Contributor Author

@Xuanwo I pushed some changes.

Let me know if a type alias for GlooTimersSleep is acceptable, or whether you'd like to have the whole previous implementation of the struct restored.

@NumberFour8 NumberFour8 requested a review from Xuanwo October 30, 2024 14:39
@Xuanwo
Copy link
Copy Markdown
Owner

Xuanwo commented Oct 30, 2024

Let me know if a type alias for GlooTimersSleep is acceptable, or whether you'd like to have the whole previous implementation of the struct restored.

Thank you for your efforts; I prefer to leave them unchanged.

@NumberFour8 NumberFour8 force-pushed the feature/add-futures-timer branch from 80e4f72 to d350da8 Compare December 25, 2024 19:58
@NumberFour8 NumberFour8 changed the title Replace gloo-timers with futures-timer feat: add Sleeper based on futures-timer Dec 25, 2024
@NumberFour8
Copy link
Copy Markdown
Contributor Author

Let me know if a type alias for GlooTimersSleep is acceptable, or whether you'd like to have the whole previous implementation of the struct restored.

Thank you for your efforts; I prefer to leave them unchanged.

Added the requested changes, pls check it out.

@NumberFour8 NumberFour8 requested a review from Xuanwo December 26, 2024 18:12
Copy link
Copy Markdown
Owner

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

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

Thank you @NumberFour8 for this!

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

Successfully merging this pull request may close these issues.

Why not using futures-timer ?

2 participants