Skip to content

Commit

Permalink
Inline join call
Browse files Browse the repository at this point in the history
Also leave comment on its own line above.
  • Loading branch information
jakirkham committed Nov 20, 2020
1 parent 3a25352 commit 17f6ef5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions distributed/comm/tcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@ async def write(self, msg, serializers=None, on_error="message"):
lengths = [nbytes(frame) for frame in frames]
length_bytes = struct.pack(f"Q{nframes}Q", nframes, *lengths)
if sum(lengths) < 2 ** 17: # 128kiB
b = b"".join([length_bytes, *frames]) # small enough, send in one go
stream.write(b)
# small enough, send in one go
stream.write(b"".join([length_bytes, *frames]))
else:
# avoid large memcpy, send in many
stream.write(length_bytes)
Expand Down

0 comments on commit 17f6ef5

Please sign in to comment.