Skip to content
This repository was archived by the owner on Apr 17, 2026. It is now read-only.

buildenv-v0.2.2

@kongoshuu kongoshuu tagged this 01 Aug 19:03
Instead of maintaining one mutex for each fd in IOManager, just increase
the reference of the shared_ptr for each operation regarding that fd to
avoid the IOContext getting deleted while there's still operation on it.
This will allow multiple operations to occur on a file descriptor
concurrently. The IOContext implementation(e.g., the host operating
system for NativeIOContext) is responsible for ensuring proper behavior
when this occurs.
Also move fd_table_lock_ from FileDescriptorTable class to IOManager,
and IOManager is now responsible for maintaining thread safety of the
table. This is to make sure that when multiple checking/accessing to the
table needs to happen, no other thread modifies the table in between.

PiperOrigin-RevId: 206967826
Assets 2
Loading