Nonblocking.pread

Issues a pread request, filling the buffer as much as possible, expecting the user to suspend the caller manually.

This will read buf.length number of bytes from fd to buf, starting from offset.

class Nonblocking
Job*
pread

Parameters

buf void[]

buffer to fill

fd int

file descriptor to read from

offset size_t

offset in the file to read from

suspended_job JobNotification

suspended job to resume upon finishing the IO operation and calling finish_callback_dg

Return Value

Type: Job*

Job that's scheduled

Throws

ErrnoException with appropriate errno set in case of failure

Meta