We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2602b65 commit a35af2eCopy full SHA for a35af2e
aerospike-core/src/task/task.rs
@@ -14,8 +14,8 @@
14
// the License.
15
16
use crate::errors::{ErrorKind, Result};
17
-use std::thread;
18
-use std::time::{Duration, Instant};
+use aerospike_rt::sleep;
+use aerospike_rt::time::{Duration, Instant};
19
20
/// Status of task
21
#[derive(Debug, Clone, Copy)]
@@ -44,7 +44,7 @@ pub trait Task {
44
loop {
45
// Sleep first to give task a chance to complete and help avoid case where task hasn't
46
// started yet.
47
- thread::sleep(POLL_INTERVAL);
+ sleep(POLL_INTERVAL).await;
48
49
match self.query_status().await {
50
Ok(Status::NotFound) => {
0 commit comments