dispatch_set_qos_class_floor
Specifies the minimum quality-of-service level for a dispatch queue, source, or workloop.
Declaration
extern void dispatch_set_qos_class_floor(dispatch_object_t object, dispatch_qos_class_t qos_class, int relative_priority);Parameters
- object:
The Dispatch_queue_t, Dispatch_source_t, or Dispatch_workloop_t object you want to modify. This object must be currently inactive. If you specify an object other than a dispatch queue, source, or workloop, this function terminates the current process.
- qos_class:
The minimum quality-of-service (QoS) level to assign to the object.
- relative_priority:
The relative priority within the QoS level. This value is a negative offset from the scheduler priority associated with the value in qos_class. This value must not be greater than
0.
Discussion
Use this function to enforce a minimum QoS level on all tasks you assign to the object. If the QoS level of a work item is below the specified minimum, the queue, source, or workloop elevates the priority of that work item to the minimum value. Elevation of the priority happens even if the work item doesn’t have “enforce” semantics in place.