Instance MethodDispatch
sync(flags:execute:)
Submits a block for synchronous execution on this queue.
func sync<T>(flags: DispatchWorkItemFlags, execute work: () throws -> T) rethrows -> T
Parameters
flagsFlags that control the execution environment of the
executeThe work item to be invoked on the queue.
Discussion
Submits a work item to a dispatch queue like sync(execute:), and returns the value, of type T, returned by that work item.
returns the value returned by the work item.
See Also
sync(execute:)
See Also
DispatchWorkItemFlags