> 
> On May 8, 2009, at 12:48 PM, Trygve Inda wrote:
> 
>> My app is a background app that sends and receives distributed
>> notifications, reads from a few large mmap'd files and crates a new
>> file
>> every few minutes (and deletes the old one).
>> 
>> When it is running, the display sleeps, but the system does not. How
>> can I
>> tell the OS that it is ok to sleep. Since I don't have a GUI, there
>> is never
>> any user interaction.
>> 
>> Is it not sleeping because I am creating files?
>> 
> 
> Yes, the creation of files is what's keeping things from sleeping.  I
> ran into the same problem with one of my apps.  It loads data rather
> than writes it, but that causes the same problem.

Hmm... It is still not sleeping although the code you provided works. I stop
writing files 10 minutes before it is meant to sleep. One thing is I am
still reading from a file that is mmap'd so I al accessing memory rather
than using the File Manager. Would this disrupt things?

I suppose I could just halt my app completely... Would reading an mmap'd
file disrupt the idle time for the OS?

Trygve


_______________________________________________

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

Reply via email to