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 (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com