pkarsy 08/04/2025 06:15 PMHi, lets say we have this task
task::
pin := gpio.Pin 2 --output
while true:
pin.set 1
sleep --ms=2000
pin.set 0
sleep --ms=2000
After a button press(another task or the same task) we need to respond immediatelly, so the sleep here is inapropriate. I have tried with "monitor" Mutex await try-await but I cannot do it. Ok there is the possibility of a tight loop with "sleep --ms=50" but I have hoped for something more elegant