[swift-users] Bls: Bls: GCD and Process
Mr Bee
pak.lebah at yahoo.com
Sun Jan 8 23:56:46 CST 2017
> [1] 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.
Thank you.
–Mr Bee
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 [1] 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
[1] 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
https://lists.swift.org/mailman/listinfo/swift-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20170109/e5078d8b/attachment.html>
More information about the swift-users
mailing list