mirror of
https://github.com/embassy-rs/embassy.git
synced 2025-10-02 14:44:32 +00:00
Merge pull request #2756 from Frostie314159/ticker_send_sync
Made `Ticker::next` `Send+Sync`.
This commit is contained in:
commit
0549dd5fd7
@ -203,7 +203,7 @@ impl Ticker {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Waits for the next tick.
|
/// Waits for the next tick.
|
||||||
pub fn next(&mut self) -> impl Future<Output = ()> + '_ {
|
pub fn next(&mut self) -> impl Future<Output = ()> + Send + Sync + '_ {
|
||||||
poll_fn(|cx| {
|
poll_fn(|cx| {
|
||||||
if self.expires_at <= Instant::now() {
|
if self.expires_at <= Instant::now() {
|
||||||
let dur = self.duration;
|
let dur = self.duration;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user