Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters