[issue34128] Do not block threads when pickle/unpickle

2018-07-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: A workaround is writing Python wrappers for IO: def Writer: def __init__(self, file): self.file = file def write(self, data): return self.file.write(data) def Reader: def __init__(self, file): self.file = file def rea

[issue34128] Do not block threads when pickle/unpickle

2018-07-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: This is about releasing the GIL periodically to allow other threads to run, as Python already does in its main interpreter loop. -- nosy: +pitrou versions: +Python 3.8 -Python 3.6 ___ Python tracker

[issue34128] Do not block threads when pickle/unpickle

2018-07-16 Thread ppperry
ppperry added the comment: um, something doesn't make sense about this. the python implementation of pickle never released the GIL (it can't, by definition -- it's written in python). The C implementation releasing the GIL wouldn't make sense, as the pickle api involves calls into python eve

[issue34128] Do not block threads when pickle/unpickle

2018-07-16 Thread Martin Bammer
New submission from Martin Bammer : Hi, the old and slow python implementation of pickle didn't block background thread. But the newer C-implementation blocks other threads while dump/load is running. Wouldn't it be possible to allow other threads during this time? Especially could load/loads r