Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Async apis for NonBlockingFileIO (#2576)
* Async versions of NonBlockingFileIO functions I have not produced async versions of the readChunked functions. These would likely be replaced with an AsyncSequence though. * Add tests for async versions of NonBlockingFileIO * Add wrapper for FileRegion to avoid Sendable issues * Allocate ByteBuffer in readSync * Update read_10000_chunks_from_file alloc count * Add UnsafeTransfer to NIOPosix. Use in NonBlockingFileIO.openFile functions * Update Sources/NIOPosix/NonBlockingFileIO.swift Co-authored-by: George Barnett <[email protected]> * formatting, docc * update comment * replace openFile with withOpenFile * More indentation * Update comments * Remove docc links to NIOCore types * Fix read docc links * Catch errors when closing file handle in withOpenFile * rename to withFileHandle * Fix double close on error Also - move @available above each function - Remove wording about separate from Task pool * Update Sources/NIOPosix/NonBlockingFileIO.swift Co-authored-by: George Barnett <[email protected]> * withOpenFile is now withFileRegion --------- Co-authored-by: George Barnett <[email protected]>
- Loading branch information