Cost of opening | Cost of i/o | Concurrency and Atomicity | Other remarks | |
---|---|---|---|---|
`file_handle` | Least | Syscall | POSIX guarantees (usually) | Least gotcha |
`async_file_handle` | More | Most (syscall + malloc/free + reactor) | POSIX guarantees (usually) | Makes no sense to use with cached i/o as it's a very expensive way to call `memcpy()` |
`mapped_file_handle` | Most | Least | None | Cannot be used with uncached i/o |