PymateIO-Delaying: Difference between revisions
Jump to navigation
Jump to search
NEVER USE BLOCKING INSTRUCTION in the mainloop
The sleep(), sleep_ms() are BLOCKING INSTRUCTIONS.
They should never be used in your script, neither in the mainloop
| Line 8: | Line 8: | ||
because this lock the code execution in a waiting state... whereas critical may requires active execution. | because this lock the code execution in a waiting state... whereas critical may requires active execution. | ||
{{dbox-gray|<br />The '''sleep()''', '''sleep_ms()''' are '''BLOCKING INSTRUCTIONS'''. | {{dbox-gray|<br />The '''sleep()''', '''sleep_ms()''' are '''BLOCKING INSTRUCTIONS'''.<br/>They should '''never be used''' in your script, neither in the mainloop<br /></br />}} | ||
They should never be used in your | |||
{{PYMATE-TRAILER}} | {{PYMATE-TRAILER}} | ||
Revision as of 16:34, 29 June 2026
Abstract
The "Cycle Timing" tutorial state the following
NEVER USE BLOCKING INSTRUCTION in the mainloop
because this lock the code execution in a waiting state... whereas critical may requires active execution.
The sleep(), sleep_ms() are BLOCKING INSTRUCTIONS.
They should never be used in your script, neither in the mainloop
PymateIO all right reserved © 2026 - Written by MCHobby for PymateIO