Class IOSchedulerJob

java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.gio.IOSchedulerJob
All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") @Deprecated public class IOSchedulerJob extends ProxyInstance
Deprecated.
Use GLib.ThreadPool or Task.runInThread(TaskThreadFunc)
Opaque class for defining and scheduling IO jobs.
  • Constructor Details

    • IOSchedulerJob

      public IOSchedulerJob(MemorySegment address)
      Deprecated.
      Create a IOSchedulerJob proxy instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
  • Method Details

    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      Deprecated.
      The memory layout of the native struct.
      Returns:
      the memory layout
    • sendToMainloop

      @Deprecated public boolean sendToMainloop(@Nullable SourceFunc func)
      Deprecated.
      Use g_main_context_invoke().
      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).
      Parameters:
      func - a GSourceFunc callback that will be called in the original thread
      Returns:
      The return value of func
    • sendToMainloopAsync

      @Deprecated public void sendToMainloopAsync(@Nullable SourceFunc func)
      Deprecated.
      Use g_main_context_invoke().

      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 userData 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 userData.

      Parameters:
      func - a GSourceFunc callback that will be called in the original thread