kopia lustrzana https://github.com/micropython/micropython-lib
multiprocessing: Connection.recv() must raise EOFError on EOF.
Per CPython docs.pull/33/merge
rodzic
536c2f373d
commit
6c5f1c62d8
|
@ -49,8 +49,12 @@ class Connection:
|
|||
|
||||
def recv(self):
|
||||
s = self.f.read(4)
|
||||
if not s:
|
||||
raise EOFError
|
||||
l = int.from_bytes(s)
|
||||
s = self.f.read(l)
|
||||
if not s:
|
||||
raise EOFError
|
||||
return pickle.loads(s)
|
||||
|
||||
def close(self):
|
||||
|
|
Ładowanie…
Reference in New Issue