diff options
author | Brett Cannon <brett@python.org> | 2013-10-18 15:39:32 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2013-10-18 15:39:32 (GMT) |
commit | af002e6482fbd6f6c6e87c69c72d3097578a29fe (patch) | |
tree | 8a97a1940ec48b86ab54baab0cfc6e4bfd2291ed /Lib/asyncio/selector_events.py | |
parent | 27e27f7ee1f366e52cfd576b427e923190b6202e (diff) | |
parent | 44455e8dba939d9ad6fc616997ad7981c4002be9 (diff) | |
download | cpython-af002e6482fbd6f6c6e87c69c72d3097578a29fe.zip cpython-af002e6482fbd6f6c6e87c69c72d3097578a29fe.tar.gz cpython-af002e6482fbd6f6c6e87c69c72d3097578a29fe.tar.bz2 |
merge
Diffstat (limited to 'Lib/asyncio/selector_events.py')
-rw-r--r-- | Lib/asyncio/selector_events.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/asyncio/selector_events.py b/Lib/asyncio/selector_events.py index e8ae885..2edac65 100644 --- a/Lib/asyncio/selector_events.py +++ b/Lib/asyncio/selector_events.py @@ -406,13 +406,13 @@ class _SelectorSocketTransport(_SelectorTransport): if waiter is not None: self._loop.call_soon(waiter.set_result, None) - def pause(self): - assert not self._closing, 'Cannot pause() when closing' + def pause_reading(self): + assert not self._closing, 'Cannot pause_reading() when closing' assert not self._paused, 'Already paused' self._paused = True self._loop.remove_reader(self._sock_fd) - def resume(self): + def resume_reading(self): assert self._paused, 'Not paused' self._paused = False if self._closing: @@ -590,19 +590,19 @@ class _SelectorSslTransport(_SelectorTransport): if self._waiter is not None: self._loop.call_soon(self._waiter.set_result, None) - def pause(self): + def pause_reading(self): # XXX This is a bit icky, given the comment at the top of # _on_ready(). Is it possible to evoke a deadlock? I don't # know, although it doesn't look like it; write() will still # accept more data for the buffer and eventually the app will - # call resume() again, and things will flow again. + # call resume_reading() again, and things will flow again. - assert not self._closing, 'Cannot pause() when closing' + assert not self._closing, 'Cannot pause_reading() when closing' assert not self._paused, 'Already paused' self._paused = True self._loop.remove_reader(self._sock_fd) - def resume(self): + def resume_reading(self): assert self._paused, 'Not paused' self._paused = False if self._closing: |