Support preadv/pwritev for multi-thread file IO.

This commit is contained in:
Xie Han
2024-06-20 16:14:00 +08:00
committed by xiehan
parent f6d46a9ed9
commit 719eefd757
4 changed files with 82 additions and 13 deletions

View File

@@ -195,6 +195,5 @@ Linux操作系统支持一套效率很高CPU占用非常少的异步IO系统
我们曾经实现过一套posix aio接口用于支持其它UNIX系统并使用线程的sigevent通知方式但由于其效率太低已经不再使用了。
目前对于非Linux系统异步IO一律是用多线程实现在IO任务到达时实时创建线程执行IO任务callback回到handler线程池。
多线程IO也是macOS下的唯一选择因为macOS没有良好的sigevent支持posix aio行不通。
多线程IO不支持preadv和pwritev两种任务创建并运行这两种任务会在callback里得到一个ENOSYS错误。
某些UNIX系统不支持fdatasync调用这种情况下fdsync任务将等价于fsync任务。