class IOR::IOUring
- IOR::IOUring
- Reference
- Object
Defined in:
ior/uring.crConstructors
-
.new(size : Int32 = 32, sq_poll : Bool = false, io_poll : Bool = false, worker : IOUring | Nil = nil)
Regarding worker, it is quite useless now as it only works with sqpoll set.
- .new(**options, &)
Instance Method Summary
- #close
- #closed? : Bool
-
#cq_ready
Completion events waiting for processing.
- #fd
- #finalize
-
#full_submission_queue?
Returns true if the submission queue is full.
- #io_poll : Bool
-
#peek
Returns next event if one is available.
-
#peek(into cqes, &)
Peek and yield multiple CQEs, using a provided buffer as intermediary cache.
-
#peek(&)
Yields next event if available, and marks it as seen when done.
-
#register_files(files)
Register files for less costly access.
-
#seen(cqe : IOR::CQE)
Marks an event as consumed
- #size : Int32
- #sq_poll : Bool
-
#sq_ready
Return how many unsubmitted entries there is in the submission queue.
-
#sq_space_left
Space left in the submission queue.
-
#sqe
Returns a sqe if there is space available, or nil.
- #sqe! : SQE
-
#submit
Submit events to kernel
-
#submit_and_wait(nr = 1)
Submit events to kernel, and wait for nr responses.
- #unregister_files
-
#unsubmitted?
Returns true if there are any unsubmitted SQEs.
-
#wait(nr, timeout : Pointer(LibC::Timespec)) : CQE | Nil
Returns next event unless timeout happens.
-
#wait(timeout : Pointer(LibC::Timespec)) : CQE | Nil
Returns next event.
-
#wait(nr) : CQE
Returns next event.
-
#wait : CQE
Returns next event.
-
#wait(timeout : Pointer(LibC::Timespec), &)
Yields next event unless a timeout happens, and marks it as seen when done.
-
#wait(&)
Yields next event, and marks it as seen when done.
Constructor Detail
Regarding worker, it is quite useless now as it only works with sqpoll set. It used to be more useful.
Instance Method Detail
Peek and yield multiple CQEs, using a provided buffer as intermediary cache.
Register files for less costly access. Note: Registering will replace any other registered files.
TODO Support io_uring_register_files_update when kernel get support for it.
Submit events to kernel, and wait for nr responses. Saves a syscall compared to submit followed by wait. Returns submission count so user will still need a call to wait to actually get to the result.
Returns next event unless timeout happens. Waits for nr events to be completed if none are available
Returns next event. Waits for an event to be completed if none are available.
Returns next event. Waits for nr events to be completed if none are available
Returns next event. Waits for an event to be completed if none are available
Yields next event unless a timeout happens, and marks it as seen when done.