]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Refactor:
authorRaymond Hettinger <python@rcn.com>
Fri, 17 Dec 2004 13:52:20 +0000 (13:52 +0000)
committerRaymond Hettinger <python@rcn.com>
Fri, 17 Dec 2004 13:52:20 +0000 (13:52 +0000)
commitbf72b7163018924e42a272b4e70601f394e840e6
tree136f95e14a00efac07b26fa78973048ad28f9ebd
parent6f5b741a4696bc8f331b1d9c77307940528813ff
Refactor:
* Improve algorithm -- no more O(n) steps except sched.cancel().
* Improve thread safety of sched.run() and sched.empty()
  (other threads could alter the queue between the time the queue was
   first checked and when the lead event was deleted).
* Localize variable access in sched.run() to minimize overhead.
Lib/sched.py