[swift-users] Bls: Bls: GCD and Process
pak.lebah at yahoo.com
Sun Jan 8 23:56:46 CST 2017
>  This doesn’t actually park the thread (at least on Darwin platforms) but instead does the rather neat trick of terminating the main thread while leaving the process alive (-:
How to do such a trick? Do you have any refferences that discuss further about this? I'm still a newbie with both Swift and GCD. There are still many things I have to read and understand.
Pada Jumat, 6 Januari 2017 15:35, "Quinn "The Eskimo!" via swift-users" <swift-users at swift.org> menulis:
On 6 Jan 2017, at 07:53, Mr Bee via swift-users <swift-users at swift.org> wrote:
> How to make my app alive to make the second queue finish its job?
The standard approach here is to park the main thread  in `dispatchMain()`. Then, when all your work is done, exit the process explicitly by calling `exit(_:)`.
Share and Enjoy
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
 This doesn’t actually park the thread (at least on Darwin platforms) but instead does the rather neat trick of terminating the main thread while leaving the process alive (-:
swift-users mailing list
swift-users at swift.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-users