[issue45194] asyncio scheduler jitter

2021-09-14 Thread Andrew Svetlov
Andrew Svetlov added the comment: asyncio provides the preemptive concurrency, not the real-time one. It means that the exact time of task switches depends on other tasks' execution and can vary by design. Sorry, the jitter is unavoidable. -- resolution: -> wont fix stage: -> resol

[issue45194] asyncio scheduler jitter

2021-09-14 Thread QuadCorei8085
QuadCorei8085 added the comment: correction: a) of course i meant loop.create_task(test_task()) b) when using threading the sleep returns every 1000ms when going lower 10-15ms is also spot on. (I wanted to use threading in my app but one library - websocket - is asyncio based thus i'm stuck

[issue45194] asyncio scheduler jitter

2021-09-14 Thread QuadCorei8085
New submission from QuadCorei8085 : I'm trying to do something periodically and this would be on the millisec level precision. However for some reason I could not achieve precise timing in a task. Below example shows that a simple sleep randomly awakes with a jitter between 0.1-20.0ms I haven'