swiftlang / swiftlang/swift-corelibs-libdispatch
[SR-2107] LIBDispatch DispatchIO read Max Int not reading until EOF
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 2.6k
- Forks
- 496
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 3
Description
| Previous ID | SR-2107 |
| Radar | None |
| Original Reporter | sandmman (JIRA User) |
| Type | Bug |
Environment
OSX Xcode 8
Additional Detail from JIRA
| Votes | 1 |
| Component/s | libdispatch |
| Labels | Bug, SDKOverlay |
| Assignee | None |
| Priority | Medium |
md5: 8a4cf83f85fd0da59a4731c667e0be19
Issue Description:
Although the previous iteration of dispatch_io_read() allows you to pass the value SIZE_MAX as the length in order to read the entire file until an EOF character is reached, DispatchIO.read() no longer supports this. Instead giving the value ```Int.max``` leads the channel to wait indefinitely until the max size is available to read.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce DispatchIO.read() on OSX with Xcode 8 using Int.max, then compare its behavior with the previous dispatch_io_read() API using SIZE_MAX. The issue is resolved when an Int.max read completes at EOF instead of waiting for the maximum size to become available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100