dabeaz / curio

Good Curio!
Other
4.02k stars 241 forks source link

Add sleep readout to monitor #251

Closed Fuyukai closed 6 years ago

Fuyukai commented 6 years ago

This adds a sleep column to the monitor, which will show sleep times for any sleeping tasks.

curio > ps      
Task   State        Cycles     Timeout Sleep   Task                                               
------ ------------ ---------- ------- ------- --------------------------------------------------
1      FUTURE_WAIT  1          None    None    Monitor.monitor_task                              
2      READ_WAIT    1          None    None    Kernel._run_coro.<locals>._kernel_task            
3      TIME_SLEEP   1          None    5996.34 testfn  

The alternative way is to have this read in the timeout column, but I figured that might be confusing.