sync(flags:execute:)
Submits a block for synchronous execution on this queue.
func sync<T>(flags: DispatchWorkItemFlags, execute work: () throws -> T) rethrows -> T
Parameters
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.