TaskPolicyManager
A task policy manager.
struct TaskPolicyManager
Creating a Task Policy Manager
init(task: Mach.Task
) Creates a task policy manager.
let port: Mach.Task
The task port.
General Operations
func get<DataType>(Mach.TaskPolicyFlavor, as: DataType.Type
) throws -> DataType Gets the task’s policy.
func set<DataType>(Mach.TaskPolicyFlavor, to: DataType
) throws Sets the task’s policy.
Managing Specific Policy
var categoryPolicy: task_category_policy
The task’s category policy.
func setCategoryPolicy(to: task_category_policy
) throws Sets the task’s category policy.
var suppressionPolicy: task_suppression_policy
The task’s suppression policy.
func setSuppressionPolicy(to: task_suppression_policy
) throws Set’s the task’s suppression policy.
var policyState: task_policy_state
The task’s policy state.
var qosPolicy: task_qos_policy
The task’s QoS policy.
func setQoSPolicy(to: task_qos_policy
) throws Sets the task’s QoS policy.
func setLatencyQoSPolicy(to: task_qos_policy
) throws Set’s the task’s latency QoS policy.
func setThroughputQoSPolicy(to: task_qos_policy
) throws Set’s the task’s throughput QoS policy.