Skip to content

Commit 1cbd9c3

Browse files
committed
feat: Use nanosleep(1) in our balance strategy
1 parent af82697 commit 1cbd9c3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/workspace/workbranch.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,8 @@ class workbranch {
304304
++spin_count;
305305
std::this_thread::yield();
306306
} else {
307-
std::this_thread::sleep_for(std::chrono::microseconds(500));
307+
// Just tell the system to suspend this thread in the shortest time
308+
std::this_thread::sleep_for(std::chrono::nanoseconds(1));
308309
}
309310
break;
310311
}

0 commit comments

Comments
 (0)