swift - What is the difference between dispatch_queue_t! and dispatch_queue_t? -


the headers dispatch_get_global_queue returns global queue or null.

 * @result  * returns requested global queue or null if requested global queue  * not exist.  */ @available(osx 10.6, *) @warn_unused_result public func dispatch_get_global_queue(identifier: int, _ flags: uint) -> dispatch_queue_t! 

why return value dispatch_queue_t! instead of optional dispatch_queue_t?

the dispatch_queue_t! optional, it's implicitly unwrapped 1 (saving having manually unwrap every time use it).

when see implicitly unwrapped optionals in cocoa apis, means haven't yet audited particular api nullability. or perhaps wanted save having manually unwrap optional yourself. or perhaps it's artifact gcd objects employ non-standard interface (it returns arc-compatible objects doesn't use usual objective-c * object references), maybe swift bridging can't handle gracefully.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -