<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue-Light, Helvetica Neue Light, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div dir="ltr" id="yui_3_16_0_ym19_1_1483940019235_30342"><span>&gt;&nbsp;</span><span style="font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;" id="yui_3_16_0_ym19_1_1483940019235_30337">[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 (-:</span></div><div></div><div id="yui_3_16_0_ym19_1_1483940019235_30305"><br></div><div id="yui_3_16_0_ym19_1_1483940019235_30305">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.</div><div id="yui_3_16_0_ym19_1_1483940019235_30305"><br></div><div id="yui_3_16_0_ym19_1_1483940019235_30305">Thank you.</div><div id="yui_3_16_0_ym19_1_1483940019235_30305">&nbsp;</div><div class="signature" id="yui_3_16_0_ym19_1_1483940019235_30334"><div id="yui_3_16_0_ym19_1_1483940019235_30333"><br></div>–Mr Bee<div id="yui_3_16_0_ym19_1_1483940019235_30467"><br></div></div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: HelveticaNeue-Light, Helvetica Neue Light, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"><font size="2" face="Arial"> Pada Jumat, 6 Januari 2017 15:35, "Quinn "The Eskimo!" via swift-users" &lt;swift-users@swift.org&gt; menulis:<br></font></div>  <br><br> <div class="y_msg_container"><br clear="none">On 6 Jan 2017, at 07:53, Mr Bee via swift-users &lt;<a shape="rect" ymailto="mailto:swift-users@swift.org" href="mailto:swift-users@swift.org">swift-users@swift.org</a>&gt; wrote:<br clear="none"><br clear="none">&gt; How to make my app alive to make the second queue finish its job?<br clear="none"><br clear="none">The standard approach here is to park the main thread [1] in `dispatchMain()`.&nbsp; Then, when all your work is done, exit the process explicitly by calling `exit(_:)`.<br clear="none"><br clear="none">Share and Enjoy<br clear="none">--<br clear="none">Quinn "The Eskimo!"&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;<a shape="rect" href="http://www.apple.com/developer/" target="_blank">http://www.apple.com/developer/</a>&gt;<br clear="none">Apple Developer Relations, Developer Technical Support, Core OS/Hardware<br clear="none"><br clear="none">[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 (-:<div class="yqt8923019098" id="yqtfd61753"><br clear="none"><br clear="none">_______________________________________________<br clear="none">swift-users mailing list<br clear="none"><a shape="rect" ymailto="mailto:swift-users@swift.org" href="mailto:swift-users@swift.org">swift-users@swift.org</a><br clear="none"><a shape="rect" href="https://lists.swift.org/mailman/listinfo/swift-users" target="_blank">https://lists.swift.org/mailman/listinfo/swift-users</a><br clear="none"></div><br><br></div>  </div> </div>  </div></div></body></html>