skypjack / uvw

Header-only, event based, tiny and easy to use libuv wrapper in modern C++ - now available as also shared/static library!
MIT License
1.82k stars 207 forks source link

Issuing multiple filesystem operations at a time with user supplied buffer #309

Closed ReimuNotMoe closed 4 months ago

ReimuNotMoe commented 8 months ago

If I understand correctly, the uv_fs_read() / uv_fs_write() can be invoked unlimited times per event loop tick, unlike their socket counterparts.

So is it possible to let the user supply the buffer for read()/write() in file_req (it's the user's responsibility to manage its lifecycle) ? In this way, multiple requests can be issued sequentially.

skypjack commented 8 months ago

Hi, sorry for the late reply. As far as I can tell, file_req::write already accepts an user defined buffer. Am I wrong?

skypjack commented 4 months ago

Closing this issue as starving. Feel free to reopen it or continue the discussion here if needed. Thanks.