Skip to content

Commit cdab9d3

Browse files
committed
CRF: rename _start_write() to _initiate_write()
Tweaked the comments too. Refs #445
1 parent 9c6ecb6 commit cdab9d3

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

uvloop/handles/stream.pxd

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,12 @@ cdef class UVStream(UVBaseTransport):
3030
cdef inline __reading_started(self)
3131
cdef inline __reading_stopped(self)
3232

33-
# The user API firstly calls _buffer_write() to buffer up user data chunks,
34-
# potentially multiple times in writelines(), and then call _start_write()
35-
# to start writing either immediately or in the next iteration.
33+
# The user API write() and writelines() firstly call _buffer_write() to
34+
# buffer up user data chunks, potentially multiple times in writelines(),
35+
# and then call _initiate_write() to start writing either immediately or in
36+
# the next iteration (loop._queue_write()).
3637
cdef inline _buffer_write(self, object data)
37-
cdef inline _start_write(self)
38+
cdef inline _initiate_write(self)
3839

3940
# _exec_write() is the method that does the actual send, and _try_write()
4041
# is a fast-path used in _exec_write() to send a single chunk.

uvloop/handles/stream.pyx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ cdef class UVStream(UVBaseTransport):
420420
self._buffer_size += dlen
421421
self._buffer.append(data)
422422

423-
cdef inline _start_write(self):
423+
cdef inline _initiate_write(self):
424424
if (not self._protocol_paused and
425425
(<uv.uv_stream_t*>self._handle).write_queue_size == 0 and
426426
self._buffer_size > self._high_water):
@@ -681,7 +681,7 @@ cdef class UVStream(UVBaseTransport):
681681
self._conn_lost += 1
682682
return
683683
self._buffer_write(buf)
684-
self._start_write()
684+
self._initiate_write()
685685

686686
def writelines(self, bufs):
687687
self._ensure_alive()
@@ -693,7 +693,7 @@ cdef class UVStream(UVBaseTransport):
693693
return
694694
for buf in bufs:
695695
self._buffer_write(buf)
696-
self._start_write()
696+
self._initiate_write()
697697

698698
def write_eof(self):
699699
self._ensure_alive()

0 commit comments

Comments
 (0)