Skip to content

Commit

Permalink
Tests: use blocking executor for non-async code (#627)
Browse files Browse the repository at this point in the history
  • Loading branch information
yellowhatter authored Dec 15, 2023
1 parent 49011f1 commit 202b8bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions io/zenoh-transport/src/common/pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@ mod tests {
});

let c_ps = *ps;
let t_s = task::spawn(async move {
let t_s = task::spawn_blocking(move || {
schedule(producer, num_msg, c_ps);
});

Expand Down Expand Up @@ -972,7 +972,7 @@ mod tests {
let size = Arc::new(AtomicUsize::new(0));

let c_size = size.clone();
task::spawn(async move {
task::spawn_blocking(move || {
loop {
let payload_sizes: [usize; 16] = [
8, 16, 32, 64, 128, 256, 512, 1_024, 2_048, 4_096, 8_192, 16_384, 32_768,
Expand Down

0 comments on commit 202b8bb

Please sign in to comment.