thiell/test — Issue #174: Task.timer() returns None when called from another thread
Author: thiell
Created: 2012-03-03 16:35:38+00:00
State: open
Labels: Lib

Due to the fact that {{{Task.timer()}}} is defined as an async method (ie. has {{{@tasksyncmethod()}}} decorator), it cannot return any value.

{{{clush}}} makes use of such a timer and may create it from another task (if stdin is a tty), but it was still working and firing as expected, even if task.timer() returned None. It was not easy to see the problem due to the way we use this timer. Still, sometimes the "runtimer counter" might not be well displayed.

To fix that, make {{{Task.timer()}}} work as expected (and still thread-safe).