> On 16 Mar 2015, at 08:10, Daryle Walker <[email protected]> wrote:
> 
> To: Cocoa Developers <[email protected]>,
>  "[email protected] Programming" <[email protected]>

Please don't cross post between large lists; it tends to cause problems for the 
members of both lists.

> How should something like a NSURLSession be used in a command-line tool?

I would solve this by running the main thread's run loop.  In theory you should 
also be able to get away parking [1] the main thread in 
<x-man-page://3/dispatch_main>.

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.  Rather, the thread terminates and 
the system spawns new threads to handle any enqueued blocks.  The final effect, 
however, is like you'd parked the main thread.


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/macnetworkprog/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to