• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: iOS4: CFReadStream and background operation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iOS4: CFReadStream and background operation


  • Subject: Re: iOS4: CFReadStream and background operation
  • From: Jens Alfke <email@hidden>
  • Date: Tue, 22 Jun 2010 18:37:52 -0700

On Jun 22, 2010, at 5:21 PM, John Michael Zorko wrote:

> 2. However, CFReadStreams created _while_ the app was in the background often (though not always) _don't_ call their callbacks _until_ the app is brought in the foreground, then all of a sudden the callback happens.

I think foreground/background is a red herring — that has almost no effect on the behavior of the app.

What I _have_ seen is bugs in my code that result in incoming activity (like network I/O) not waking up the runloop, so the event doesn’t get delivered … until some other event comes in and causes the runloop to wake up. This is a lot likelier to happen when the app is in the background, because when it’s active there are user events (even the mouse entering/exiting views) that keep the runloop going pretty often.

Unfortunately I don’t remember the details of what caused this situation. I would look very carefully at your CFStream callbacks: what they do and how they get registered. Scan the system docs to make sure you’re doing everything correctly.

—Jens_______________________________________________

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

  • Follow-Ups:
    • Re: iOS4: CFReadStream and background operation
      • From: John Michael Zorko <email@hidden>
    • Re: iOS4: CFReadStream and background operation
      • From: John Michael Zorko <email@hidden>
References: 
 >iOS4: CFReadStream and background operation (From: John Michael Zorko <email@hidden>)

  • Prev by Date: Re: Problem with stopModalWithCode on a different thread
  • Next by Date: Re: Problem with stopModalWithCode on a different thread
  • Previous by thread: iOS4: CFReadStream and background operation
  • Next by thread: Re: iOS4: CFReadStream and background operation
  • Index(es):
    • Date
    • Thread