transitions icon indicating copy to clipboard operation
transitions copied to clipboard

AsyncTimeout.on_timeout is not triggered after timeout has passed

Open Rysbai opened this issue 2 years ago • 0 comments

This https://github.com/pytransitions/transitions/pull/579 should fix this problem.

Describe the bug I wanted to initialise AsyncTimeout state with timeout=0, so I can set timeout after initialisation before/after entering state. But trigger is not called after setting timeout > 0, entering the state and timeout has passed.

So in my project, I set on_timeout along with the timeout before entering to state and it's working.

Minimal working example

  • Init state machine with AsyncTimeout state and with timeout=0.
  • Set timeout to greater than 0 and enter to state.
  • Wait until timeout has passed.

Expected behavior AsyncTImeout.on_timeout has to be triggered.

Actual behavior Nothing happens

Rysbai avatar Jul 05 '22 07:07 Rysbai