#include <dispatch/workloop.h> also included by <dispatch/dispatch.h>

dispatch/workloop.h

for HeaderDoc
4 functions · 1 typedef

typedefdispatch_workloop_t

DISPATCH_DECL_SERIAL_EXECUTOR_SWIFT(dispatch_workloop, DispatchWorkloop)

functiondispatch_workloop_create

API_AVAILABLE(macos(10.14), ios(12.0), tvos(12.0), watchos(5.0)) DISPATCH_EXPORT DISPATCH_MALLOC DISPATCH_RETURNS_RETAINED DISPATCH_WARN_RESULT DISPATCH_NOTHROW DISPATCH_REFINED_FOR_SWIFT dispatch_workloop_t dispatch_workloop_create(
	const char *DISPATCH_UNSAFE_INDEXABLE _Nullable label
)
@function dispatch_workloop_create @abstract Creates a new dispatch workloop to which workitems may be submitted. @param label A string label to attach to the workloop. @result The newly created dispatch workloop.

functiondispatch_workloop_create_inactive

API_AVAILABLE(macos(10.14), ios(12.0), tvos(12.0), watchos(5.0)) DISPATCH_EXPORT DISPATCH_MALLOC DISPATCH_RETURNS_RETAINED DISPATCH_WARN_RESULT DISPATCH_NOTHROW DISPATCH_REFINED_FOR_SWIFT DISPATCH_SWIFT_NAME(DispatchWorkloop.init(__label:)) dispatch_workloop_t dispatch_workloop_create_inactive(
	const char *DISPATCH_UNSAFE_INDEXABLE _Nullable label
)
@function dispatch_workloop_create_inactive @abstract Creates a new inactive dispatch workloop that can be setup and then activated. @discussion Creating an inactive workloop allows for it to receive further configuration before it is activated, and workitems can be submitted to it. Submitting workitems to an inactive workloop is undefined and will cause the process to be terminated. @param label A string label to attach to the workloop. @result The newly created dispatch workloop.

functiondispatch_workloop_set_autorelease_frequency

API_AVAILABLE(macos(10.14), ios(12.0), tvos(12.0), watchos(5.0)) DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_NOTHROW DISPATCH_REFINED_FOR_SWIFT void dispatch_workloop_set_autorelease_frequency(
	dispatch_workloop_t workloop,
	dispatch_autorelease_frequency_t frequency
)
@function dispatch_workloop_set_autorelease_frequency @abstract Sets the autorelease frequency of the workloop. @discussion See dispatch_queue_attr_make_with_autorelease_frequency(). The default policy for a workloop is DISPATCH_AUTORELEASE_FREQUENCY_WORK_ITEM. @param workloop The dispatch workloop to modify. This workloop must be inactive, passing an activated object is undefined and will cause the process to be terminated. @param frequency The requested autorelease frequency.

functiondispatch_workloop_set_os_workgroup

API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0)) DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_NOTHROW DISPATCH_REFINED_FOR_SWIFT void dispatch_workloop_set_os_workgroup(
	dispatch_workloop_t workloop,
	os_workgroup_t workgroup
)
@function dispatch_workloop_set_os_workgroup @abstract Associates an os_workgroup_t with the specified dispatch workloop. The worker thread will be a member of the specified os_workgroup_t while executing work items submitted to the workloop. Using both dispatch_workloop_set_scheduler_priority() and dispatch_workloop_set_os_workgroup() will prefer scheduling policies from the workgroup, if they exist. @param workloop The dispatch workloop to modify. This workloop must be inactive, passing an activated object is undefined and will cause the process to be terminated. @param workgroup The workgroup to associate with this workloop. The workgroup specified is retained and the previously associated workgroup (if any) is released.