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

Replace gloo-timers with futures-timer #154

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

NumberFour8
Copy link

@NumberFour8 NumberFour8 commented Oct 17, 2024

What

  • Migrated Sleeper implementation from gloo-timers to async runtime-agnostic futures-timer

  • Adjusted feature flags and updated dependencies to reflect this change, ensuring seamless functionality across different environments:

    • gloo-timers-sleep feature kept for backwards compatibility, it will imply the automatically futures-timer-sleep

    • if wasm32 architecture is detected, it automatically enables the gloo-timers + wasm-bindgen features on futures-timer crate to ensure WASM compatibility.

Closes #153

- Migrated Sleeper implementation from `gloo-timers` to async runtime-agnostic `futures-timer`

- Adjusted feature flags and updated dependencies to reflect this change, ensuring seamless functionality across different environments:

  - `gloo-timers-sleep` feature kept for backwards compatibility, it will imply the automatically `futures-timer-sleep`

  - if `wasm32` architecture is detected, it automatically enables the `gloo-timers` feature on `futures-timer` crate to ensure WASM compatibility.

Closes Xuanwo#153
Copy link
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.

backon/Cargo.toml Outdated Show resolved Hide resolved
backon/src/sleep.rs Show resolved Hide resolved
@NumberFour8
Copy link
Author

Thanks for the comments. I will improve it.

@NumberFour8
Copy link
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.

@Xuanwo
Copy link
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.

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