Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: GIOSchedulerJob

[12:7] extends: object

Opaque class for defining and scheduling IO jobs.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • GIOSchedulerJob (Handle = null)

    Creates a new IOSchedulerJob by wrapping a native handle or another wrapper.

    • @p Handle is the native handle or another wrapper whose handle to adopt.
  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • send_to_mainloop (object 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).

    • @p func is a #GSourceFunc callback that will be called in the original thread.
    • @p user_data is data to pass to @func.
    • @p notify is a #GDestroyNotify for @user_data, or %NULL.
    • @r The return value of @func.
  • send_to_mainloop_async (object 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. Note that if you are passing the @user_data from g_io_scheduler_push_job() on to this function you have to ensure that it is not freed before @func is called, either by passing %NULL as @notify to g_io_scheduler_push_job() or by using refcounting for @user_data.

    • @p func is a #GSourceFunc callback that will be called in the original thread.
    • @p user_data is data to pass to @func.
    • @p notify is a #GDestroyNotify for @user_data, or %NULL.
    • @r None.