jobqueue.h File Reference

Classes

class  JobQueueInterface
 
class  ServiceIOJobQueueInterface
 
class  SerialJobQueueInterface
 
class  JobQueueRef
 
class  ServiceIOJobQueueRef
 
class  SerialJobQueueRef
 

Namespaces

 maxon
 

Enumerations

enum class  JOBQUEUETYPE {
  MAINTHREAD ,
  NONE ,
  LOWESTPRIORITY ,
  LOWPRIORITY ,
  NORMALPRIORITY ,
  SERVICEIO ,
  THREADLESS
}
 
enum class  JOBQUEUEMODE {
  DEFAULT ,
  SPIN_ON_IDLE ,
  SLEEP_ON_IDLE ,
  DETACH_THREADS ,
  PSEUDO_THREADS
}
 

Functions

enum maxon::JOBQUEUETYPE MAXON_ENUM_LIST (JOBQUEUETYPE)
 
enum maxon::JOBQUEUEMODE MAXON_ENUM_LIST (JOBQUEUEMODE)
 

Variables

 MAINTHREAD
 
 NONE
 
 LOWESTPRIORITY
 
 LOWPRIORITY
 
 NORMALPRIORITY
 
 SERVICEIO
 
 THREADLESS
 
 DEFAULT
 
 SPIN_ON_IDLE
 
 SLEEP_ON_IDLE
 
 DETACH_THREADS
 
 PSEUDO_THREADS
 
static const Int JOBQUEUE_USEMAXIMUMTHREADS
 
static const JobQueueInterface::Current JOBQUEUE_CURRENT
 
static const JobQueueInterface::None JOBQUEUE_NONE
 

Variable Documentation

◆ MAINTHREAD

MAINTHREAD

Jobs are executed on the main thread whenever the event loop can spare some time: there is only one queue of this type: use GetMainThreadQueue() to access it.

◆ NONE

NONE

Jobs are not enqueued but executed in the current context.

◆ LOWESTPRIORITY

LOWESTPRIORITY

Use lowest priority threads (worker threads have lowest priority and will not idle when waiting for new jobs or waiting for a group to finish).

◆ LOWPRIORITY

LOWPRIORITY

Use low priority threads.

◆ NORMALPRIORITY

NORMALPRIORITY

Use normal priority threads (You should rarely have to create a queue with normal priority. Most of the time low priority is sufficient: This makes sure that you don't interfere with really important tasks and if available you still get all cpu power).

◆ SERVICEIO

SERVICEIO

Queue is used for IO and priority is adapted accordingly. Spinning on idle is not allowed.

◆ THREADLESS

THREADLESS

◆ DEFAULT

DEFAULT

Use default settings for the queue.

◆ SPIN_ON_IDLE

SPIN_ON_IDLE

When there are no jobs threads will be spinning for a short moment before they go to sleep (low latency and highest performance but might unnecessary steals cycles from other threads).

◆ SLEEP_ON_IDLE

SLEEP_ON_IDLE

When there are no jobs threads will immediately go to sleep (results in higher latency).

◆ DETACH_THREADS

DETACH_THREADS

When there are no jobs the threads will immediately go to sleep and make themselves available to other queues (results in higher latency but less memory/resource usage).

◆ PSEUDO_THREADS

PSEUDO_THREADS

The workers behave like ordinary threads (JOBQUEUE_CURRENT points to the default queue and the threads don't have a worker thread index).