File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -159,9 +159,25 @@ pub const Loop = struct {
159
159
}
160
160
}
161
161
162
+ /// The errors that can come from submit. This has to be explicit
163
+ /// for now since Zig 0.11 has issues with the inferred error set.
164
+ /// We should try again someday.
165
+ pub const SubmitError = error {
166
+ Unexpected ,
167
+ SystemResources ,
168
+ FileDescriptorInvalid ,
169
+ FileDescriptorInBadState ,
170
+ CompletionQueueOvercommitted ,
171
+ SubmissionQueueEntryInvalid ,
172
+ BufferInvalid ,
173
+ RingShuttingDown ,
174
+ OpcodeNotSupported ,
175
+ SignalInterrupt ,
176
+ };
177
+
162
178
/// Submit all queued operations. This never does an io_uring submit
163
179
/// and wait operation.
164
- pub fn submit (self : * Loop ) ! void {
180
+ pub fn submit (self : * Loop ) SubmitError ! void {
165
181
_ = try self .ring .submit ();
166
182
167
183
// If we have any submissions that failed to submit, we try to
You can’t perform that action at this time.
0 commit comments