compio-rs / compio

A thread-per-core Rust runtime with IOCP/io_uring/polling.
MIT License
420 stars 37 forks source link

feat: add some impl for buf & io #123

Closed Berrysoft closed 1 year ago

Berrysoft commented 1 year ago

@George-Miao do we need to check the position in read_at and write_at for &[u8] and &mut [u8]?

George-Miao commented 1 year ago

Current implementation will panic on overflowed pos. Is that desirable? Or should we handle the situation?

Berrysoft commented 1 year ago

I tested on Windows and Linux for File and both of them returns no error if the pos is too large. I think we should also do so.

George-Miao commented 1 year ago

@Berrysoft Sure. Then this needs to be handled in implementation of Async{Read, Write}At for slice