Skip to content

Commit

Permalink
Revert "Bugfix: Yield after every execution of 'loop' if a loop delay…
Browse files Browse the repository at this point in the history
… of 0 is specified. (#38)" (#45)

This reverts commit 1be8f61.
  • Loading branch information
aentinger committed Nov 5, 2021
1 parent 2951862 commit 543e96a
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions src/Arduino_Threads.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,17 +118,8 @@ void Arduino_Threads::threadFunc()
}
}

if (_loop_delay_ms) {
/* Sleep for the time we've been asked to insert between loops.
*/
rtos::ThisThread::sleep_for(rtos::Kernel::Clock::duration_u32(_loop_delay_ms));
}
else
{
/* In any case yield here so that other threads can also be
* executed following the round-robin scheduling paradigm.
*/
rtos::ThisThread::yield();
}
/* Sleep for the time we've been asked to insert between loops.
*/
rtos::ThisThread::sleep_for(rtos::Kernel::Clock::duration_u32(_loop_delay_ms));
}
}

0 comments on commit 543e96a

Please sign in to comment.