Skip to content

Commit a35af2e

Browse files
committed
fixed task sleep
1 parent 2602b65 commit a35af2e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

aerospike-core/src/task/task.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
// the License.
1515

1616
use crate::errors::{ErrorKind, Result};
17-
use std::thread;
18-
use std::time::{Duration, Instant};
17+
use aerospike_rt::sleep;
18+
use aerospike_rt::time::{Duration, Instant};
1919

2020
/// Status of task
2121
#[derive(Debug, Clone, Copy)]
@@ -44,7 +44,7 @@ pub trait Task {
4444
loop {
4545
// Sleep first to give task a chance to complete and help avoid case where task hasn't
4646
// started yet.
47-
thread::sleep(POLL_INTERVAL);
47+
sleep(POLL_INTERVAL).await;
4848

4949
match self.query_status().await {
5050
Ok(Status::NotFound) => {

0 commit comments

Comments
 (0)