Skip to content

Commit 543e96a

Browse files
authored
Revert "Bugfix: Yield after every execution of 'loop' if a loop delay of 0 is specified. (#38)" (#45)
This reverts commit 1be8f61.
1 parent 2951862 commit 543e96a

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

Diff for: src/Arduino_Threads.cpp

+3-12
Original file line numberDiff line numberDiff line change
@@ -118,17 +118,8 @@ void Arduino_Threads::threadFunc()
118118
}
119119
}
120120

121-
if (_loop_delay_ms) {
122-
/* Sleep for the time we've been asked to insert between loops.
123-
*/
124-
rtos::ThisThread::sleep_for(rtos::Kernel::Clock::duration_u32(_loop_delay_ms));
125-
}
126-
else
127-
{
128-
/* In any case yield here so that other threads can also be
129-
* executed following the round-robin scheduling paradigm.
130-
*/
131-
rtos::ThisThread::yield();
132-
}
121+
/* Sleep for the time we've been asked to insert between loops.
122+
*/
123+
rtos::ThisThread::sleep_for(rtos::Kernel::Clock::duration_u32(_loop_delay_ms));
133124
}
134125
}

0 commit comments

Comments
 (0)