383ea0326ae103b5d5e0b62ed9c3cb18510c5b9e,distributed/comm/tcp.py,TCP,write,#TCP#Any#Any#Any#,229

Before Change


                stream.write(b"".join(frames))
            else:
                // avoid large memcpy, send in many
                for frame, frame_bytes in zip(frames, lengths):
                    // Can"t wait for the write() Future as it may be lost
                    // ("If write is called again before that Future has resolved,
                    //   the previous future will be orphaned and will never resolve")
                    if frame_bytes:
                        future = stream.write(frame)
                        bytes_since_last_yield += frame_bytes
                        if bytes_since_last_yield > 32e6:
                            await future
                            bytes_since_last_yield = 0
        except StreamClosedError as e:
            self.stream = None
            self._closed = True
            if not shutting_down():

After Change


                    stream._total_write_index += each_frame_nbytes

            // start writing frames
            stream.write(b"")
        except StreamClosedError as e:
            self.stream = None
            self._closed = True
            if not shutting_down():
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: dask/distributed
Commit Name: 383ea0326ae103b5d5e0b62ed9c3cb18510c5b9e
Time: 2021-02-17
Author: jakirkham@gmail.com
File Name: distributed/comm/tcp.py
Class Name: TCP
Method Name: write


Project Name: senarvi/theanolm
Commit Name: 91184b6bdcdbce3a37cc91a54801b98356910849
Time: 2015-11-22
Author: seppo.git@marjaniemi.com
File Name: theanolm/commands/score.py
Class Name:
Method Name: _score_text


Project Name: hanxiao/bert-as-service
Commit Name: 0a6b1bd320c996a9fca13a2e3b6611aa8cde7506
Time: 2019-01-21
Author: hanhxiao@tencent.com
File Name: benchmark.py
Class Name:
Method Name: