IOSchedulerJob

Opaque class for defining and scheduling IO jobs.

Constructors

this
this(GIOSchedulerJob* gIOSchedulerJob, bool ownedRef)

Sets our main struct and passes it to the parent class.

Members

Functions

getIOSchedulerJobStruct
GIOSchedulerJob* getIOSchedulerJobStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

sendToMainloop
bool sendToMainloop(GSourceFunc func, void* userData, GDestroyNotify notify)

Used from an I/O job to send a callback to be run in the thread that the job was started from, waiting for the result (and thus blocking the I/O job).

sendToMainloopAsync
void sendToMainloopAsync(GSourceFunc func, void* userData, GDestroyNotify notify)

Used from an I/O job to send a callback to be run asynchronously in the thread that the job was started from. The callback will be run when the main loop is available, but at that time the I/O job might have finished. The return value from the callback is ignored.

Static functions

cancelAllJobs
void cancelAllJobs()

Cancels all cancellable I/O jobs.

pushJob
void pushJob(GIOSchedulerJobFunc jobFunc, void* userData, GDestroyNotify notify, int ioPriority, Cancellable cancellable)

Schedules the I/O job to run in another thread.

Variables

gIOSchedulerJob
GIOSchedulerJob* gIOSchedulerJob;

the main Gtk struct