Merge pull request #2756 from Frostie314159/ticker_send_sync
Made `Ticker::next` `Send+Sync`.
This commit is contained in:
commit
0549dd5fd7
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue