gio-GIOScheduler {RGtk2} | R Documentation

## GIOScheduler

### Description

I/O Scheduler

### Methods and Functions

`gIoSchedulerCancelAllJobs()`
`gIoSchedulerJobSendToMainloop(object, func, user.data = NULL)`
`gIoSchedulerJobSendToMainloopAsync(object, func, user.data = NULL)`

### Detailed Description

Schedules asynchronous I/O operations. `GIOScheduler` integrates into the main event loop (`GMainLoop`) and may use threads if they are available.

Each I/O operation has a priority, and the scheduler uses the priorities to determine the order in which operations are executed. They are not used to determine system-wide I/O scheduling. Priorities are integers, with lower numbers indicating higher priority. It is recommended to choose priorities between `G_PRIORITY_LOW` and `G_PRIORITY_HIGH`, with `G_PRIORITY_DEFAULT` as a default.

### Structures

`GIOSchedulerJob`

  Opaque class for definining and scheduling IO jobs.

### User Functions

`GIOSchedulerJobFunc(job, cancellable, user.data)`

  I/O Job function.

  Note that depending on whether threads are available, the `GIOScheduler` may run jobs in separate threads or in an idle in the mainloop.

  Long-running jobs should periodically check the `cancellable` to see if they have been cancelled.

  `job`

    a `GIOSchedulerJob`.

  `cancellable`

    optional `GCancellable` object, `NULL` to ignore.

  `user.data`

    the data to pass to callback function

  Returns: [logical] `TRUE` if this function should be called again to complete the job, `FALSE` if the job is complete (or cancelled)

### Author(s)

Derived by RGtkGen from GTK+ documentation

### References

https://developer-old.gnome.org/gio/stable/gio-GIOScheduler.html

[Package RGtk2 version 2.20.40 Index]