• 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: Not sleeping - Why?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Not sleeping - Why?


  • Subject: Re: Not sleeping - Why?
  • From: Trygve Inda <email@hidden>
  • Date: Sun, 10 May 2009 17:20:16 +0000
  • Thread-topic: Not sleeping - Why?

>
> 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 (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

  • Prev by Date: Re: Garbage collector related crash
  • Next by Date: Re: Hex to NSString or NSData
  • Previous by thread: Not sleeping - Why?
  • Next by thread: Re: iPhone Telephone APIs
  • Index(es):
    • Date
    • Thread