• Denis Bilenko's avatar
    Timeout(1) no longer starts the timer immediatelly; must call start() · 4c082f5a
    Denis Bilenko authored
    - start_new is a classmethod that creates Timeout and starts it
    - start() will now raise AssertionError if called when already started()
    - although it's OK to do "with t" even if t is already started
    - when start_new is passed a Timeout instance it simply returns it;
      this allows to customize timeout exception in many places by passing Timeout
      instance instead of number of seconds
    4c082f5a
test__pool.py 7.08 KB