Fix FileObjectThread.readinto to be cooperative
.readinto was forgotten to be wrapped by FileObjectBase, and without the wrapping FileObjectThread.readinto was calling into e.g. RawIO.readinto directly - instead of via threadpool - leading to deadlocks if e.g. that readinto would need to read data from a pipe produced by another greenlet. The fix is simple: add `readinto` into the list of wrapped methods in FileObjectBase. Without the fix added `test_readinto` hangs for TestFileObjectThread. NOTE FileObjectPosix.readinto was working ok even without wrapping because it implements cooperation by another way - via explicitly `make_nonblocking` provided file descriptors. /cc @jamadden
Showing
Please register or sign in to comment