class NestedScheduler::IoUringContext

Defined in:

nested_scheduler/io_uring_context.cr

Constant Summary

WAIT_TIMESPEC = LibC::Timespec.new(tv_sec: 0, tv_nsec: 50000)

What is a good waittime? Perhaps it needs to be a backoff?

TODO make use of ring timeout instead for this.

Constructors

Instance Method Summary

Constructor Detail

def self.new(context = nil, size = 32) #

[View source]

Instance Method Detail

def accept(socket, scheduler, timeout) #

[View source]
def close(fd, scheduler) #

[View source]
def connect(socket, scheduler, addr, timeout, &) #

[View source]
def new : self #

[View source]
def prepare_close(_file) #

[View source]
def read(io, scheduler, slice : Bytes) #

TODO handle read timeout


[View source]
def recv(socket, scheduler, slice : Bytes, errno_message : String) #

TODO handle read timeout


[View source]
def recvfrom(socket, scheduler, slice, sockaddr, addrlen, errno_message : String) #

todo timeout.., errmess


[View source]
def reschedule(scheduler, &) #

TODO handle submit failure?


[View source]
def ring : IOR::IOUring #

[View source]
def send(socket, scheduler, slice : Bytes, errno_message : String) : Int32 #

[View source]
def send_to(socket, scheduler, message, to addr : Socket::Address) : Int32 #

[View source]
def sleep(scheduler, fiber, time) : Nil #

[View source]
def socket_write(socket, scheduler, slice : Bytes, errno_message : String) : Nil #

TODO handle write timeout, errmess


[View source]
def wait_readable(io, scheduler, timeout, &) #

[View source]
def wait_writable(io, scheduler, timeout, &) #

[View source]
def write(io, scheduler, slice : Bytes) #

TODO add write timeout


[View source]
def yield(fiber, to other) #

[View source]