Re: GCD Is Available On iPhone/iPad
Re: GCD Is Available On iPhone/iPad
- Subject: Re: GCD Is Available On iPhone/iPad
- From: Roland King <email@hidden>
- Date: Thu, 05 May 2011 22:50:56 +0800
in recent iOS, yes
On 05-May-2011, at 10:44 PM, Bing Li wrote:
> Dear Fritz and all,
>
> I am reading one book, Daniel H Steinberg, Cocoa Programming, A Quick-Start
> Guide for Developers, 2010. Chapter 26 introduces Dispatch Queues. It
> mentions, "If you're writing an iPhone app or a desktop app that targets
> Leopard or earlier, you're out of luck."
>
> Is GCD available when implementing an application on iPad/iPhone?
>
> Thanks so much!
> Bing
>
> On Mon, Apr 18, 2011 at 2:28 AM, Fritz Anderson <email@hidden>wrote:
>
>> On 17 Apr 2011, at 12:04 PM, Bing Li wrote:
>>
>>> I am programming on iPad. I notice that background applications are not
>>> allowed for power issues on iPad. I am not sure how to define the concept
>> of
>>> background applications? In my system, I need to have multiple threads
>> run
>>> when users interact with my system. The work done by the threads is the
>>> so-called background applications? If so, threading is not allowed? If
>> not,
>>> what do background application mean exactly?
>>
>> On iOS, an application is said to be in the background once the user has
>> tapped the Home button and returned to the home display (or has
>> double-tapped the Home button to expose the recent-app display and selected
>> another app).
>>
>> This usually means that the application is suspended, but preserved in
>> memory so it can resume when it comes back to the foreground. There are
>> exceptions, if it requests one: It can manage an audio stream or a VoIP
>> conversation; it can have the system monitor a VoIP control port or location
>> events; or it can simply ask for 10 minutes to execute while it is not
>> visible. In any case, if the system needs memory or processor resources for
>> the visible application, a background application may be terminated without
>> notice.
>>
>> iOS user applications may not fork/exec additional BSD processes.
>>
>> You seem to be talking about concurrency, in which a single application
>> uses threads to execute more than one independent task at the same time. iOS
>> supports threading, and offers several ways to do it: pthreads, NSOperation,
>> NSThread, and Grand Central Dispatch. Unless you have existing code that
>> uses another technology, Grand Central Dispatch is the recommended method.
>>
>> A mailing list isn't the place to go into depth. See the Concurrency
>> Programming Guide for an overview and pointers to details. <
>> http://developer.apple.com/library/ios/#documentation/General/Conceptual/ConcurrencyProgrammingGuide/Introduction/Introduction.html
>>>
>>
>> — F
>>
>>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden