cpython: e881444f078f (original) (raw)
Mercurial > cpython
changeset 95301:e881444f078f
Serhiy Storchaka storchaka@gmail.com | |
---|---|
date | Mon, 30 Mar 2015 22:25:16 +0300 |
parents | a70ca6f35327 |
children | 0ff1090307c7 |
files | Lib/asyncio/events.py |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-)[+] [-] Lib/asyncio/events.py 4 |
line wrap: on
line diff
--- a/Lib/asyncio/events.py +++ b/Lib/asyncio/events.py @@ -178,6 +178,10 @@ class TimerHandle(Handle): self._cancelled == other._cancelled) return NotImplemented
- def ne(self, other):
equal = self.__eq__(other)[](#l1.8)
return NotImplemented if equal is NotImplemented else not equal[](#l1.9)
+ def cancel(self): if not self._cancelled: self._loop._timer_handle_cancelled(self)