> [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"
<[email protected]> menulis:
On 6 Jan 2017, at 07:53, Mr Bee via swift-users <[email protected]> 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
[email protected]
https://lists.swift.org/mailman/listinfo/swift-users
_______________________________________________
swift-users mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-users