Commit cad49b1
committed
Add non-blocking read methods for async I/O
- read_nonblock(size=-1): Read available bytes immediately, never blocks
- readable_amount(): Return bytes available without blocking
- at_eof(): Check if at EOF with no more data
These methods enable async I/O patterns where Python code needs to
check for available data without blocking, suitable for asyncio
integration.
Tests demonstrate Erlang streaming data while Python reads asynchronously.1 parent ea1de38 commit cad49b1
5 files changed
Lines changed: 1306 additions & 2 deletions
File tree
- c_src
- docs
- examples
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
13 | 16 | | |
14 | 17 | | |
15 | 18 | | |
| |||
0 commit comments