Class SharedTaskPool

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class SharedTaskPool extends TaskPool
The GstSharedTaskPool object.
Since:
1.20
  • Constructor Details

    • SharedTaskPool

      public SharedTaskPool(MemorySegment address)
      Create a SharedTaskPool instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • SharedTaskPool

      public SharedTaskPool()
      Create a new SharedTaskPool.
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the SharedTaskPool class.
      Returns:
      the GType
    • getMemoryLayout

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

      protected SharedTaskPool asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class TaskPool
      Returns:
      the instance as if it were its parent type
    • getMaxThreads

      public int getMaxThreads()
    • setMaxThreads

      public void setMaxThreads(int maxThreads)

      Update the maximal number of threads the this SharedTaskPool may spawn. When the maximal number of threads is reduced, existing threads are not immediately shut down, see g_thread_pool_set_max_threads().

      Setting maxThreads to 0 effectively freezes the pool.

      Parameters:
      maxThreads - Maximum number of threads to spawn.
      Since:
      1.20
    • builder

      public static SharedTaskPool.Builder<? extends SharedTaskPool.Builder> builder()
      A SharedTaskPool.Builder object constructs a SharedTaskPool with the specified properties. Use the various set...() methods to set properties, and finish construction with SharedTaskPool.Builder.build().
      Returns:
      the builder object