95 Span<AsyncFiberCommand> commandStorage = {});
107 [[nodiscard]]
bool isOwnerThread()
const;
112 Result runUntilComplete();
113 Result runUntilIdle();
115 Result runOwnerOnce();
116 Result runOwnerNoWait();
117 Result runOwnerUntilComplete();
118 Result runOwnerUntilIdle();
122 Result sleep(TimeMs duration);
133 Result fileReadAt(
const FileDescriptor& file, uint64_t offset, Span<char> buffer,
136 Result fileReadExactAt(
const FileDescriptor& file, uint64_t offset, Span<char> buffer,
140 Result fileWriteAt(
const FileDescriptor& file, uint64_t offset, Span<const char> data,
142 Result fileWriteAll(
const FileDescriptor& file, Span<const char> data,
144 Result fileWriteAllAt(
const FileDescriptor& file, uint64_t offset, Span<const char> data,
155 Span<AsyncFiberCommand> commands;
156 size_t commandHead = 0;
157 size_t commandCount = 0;
161 uint64_t ownerThreadID = 0;
163 Result checkOwnerThread()
const;
164 Result checkFiberContext()
const;
165 void operationStarted();
166 void operationFinished();
167 void lockCommands()
const;
168 void unlockCommands()
const;
170 Result drainCommandQueue();
171 bool hasPendingCommands()
const;
173 uint64_t offset,
bool useOffset);
177 uint64_t offset,
bool useOffset);
179 uint64_t offset,
bool useOffset);
182 Result executeStartCommand(
void* startState);
184 void* startState =
nullptr);
186 Result executeStopCommand(
void* stopState);
Asynchronous I/O (files, sockets, timers, processes, fs events, threads wake-up) (see Async) AsyncEve...
Definition Async.h:1486