summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/selector_events.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@dropbox.com>2013-10-18 14:58:20 (GMT)
committerGuido van Rossum <guido@dropbox.com>2013-10-18 14:58:20 (GMT)
commit57497ad1810304ef74774fb1abd379dec80f458b (patch)
tree1696f5389cdad967002eff56160765936aba9010 /Lib/asyncio/selector_events.py
parent40b22d0661c45ac350a7252a32ef665b81b1643c (diff)
downloadcpython-57497ad1810304ef74774fb1abd379dec80f458b.zip
cpython-57497ad1810304ef74774fb1abd379dec80f458b.tar.gz
cpython-57497ad1810304ef74774fb1abd379dec80f458b.tar.bz2
Rename Transport.pause/resume to pause_reading/pause_writing. Also relax timeout in test_call_later().
Diffstat (limited to 'Lib/asyncio/selector_events.py')
-rw-r--r--Lib/asyncio/selector_events.py14
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: