We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 113efb5 + 9f02de4 commit 12c5573Copy full SHA for 12c5573
src/core/thread.d
@@ -960,6 +960,10 @@ class Thread
960
{
961
auto maxSleepMillis = dur!("msecs")( uint.max - 1 );
962
963
+ // avoid a non-zero time to be round down to 0
964
+ if( val > dur!"msecs"( 0 ) && val < dur!"msecs"( 1 ) )
965
+ val = dur!"msecs"( 1 );
966
+
967
// NOTE: In instances where all other threads in the process have a
968
// lower priority than the current thread, the current thread
969
// will not yield with a sleep time of zero. However, unlike
0 commit comments