• 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: OSALoad/OSACompile block when machine is asleep
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OSALoad/OSACompile block when machine is asleep


  • Subject: Re: OSALoad/OSACompile block when machine is asleep
  • From: Brant Vasilieff <email@hidden>
  • Date: Tue, 13 Nov 2001 18:13:23 -0800

On Friday, November 9, 2001, at 12:09 , Markus Hitter wrote:
Am Freitag den, 9. November 2001, um 19:36, schrieb Brant Vasilieff:

When the machine is asleep, if I call OSALoad or OSACompile, that thread will wait until I wake the machine, before continuing.

Hmmm - if the machine is asleep, you can't call anything. If some task is in progress, the machine won't fall asleep.

At least this is how I know it.

I'm not familiar with the newer machines, but was under the impression that there were several levels of sleep. I guess I mean idle, or possible doze. I'm not sure.


I'm am able to open the file and fetch the script resource out of it just fine, but when I attempt to load or compile it, it just stops. It's possible that the file is in te disk cache. When I do finally manually wake the machine up the drive spins up, and the script loads and executes just fine.

Are there chances you confuse machine sleep with disk sleep (spin down)?

Yes. The only thing I can guarantee is that both the display and disk are in sleep mode. I have all sliders in the Energy Saver preference panel set to 5 minutes, so I don't have to wait to long to test. The display is easy enough to see visually, that the power light is orange instead of green, and the drive makes a very high pitched noise when spinning. I have a thread, that executes a script. The call to OSALoad and OSAExecute seem to block until the drive spins up, which doesn't happen until I move the mouse.

OpenDefaultComponent sometimes also blocks until the drive spins up.


Is there a way to force the machine to wake up?

Any file read with a cache miss should spin up the disk.

I'm not seeing this. I tried reading a file, but was worried about the second time around having it in the cache, so I tried writing a small file as well. What happens, is that the file is created, but not actually saved to disk until I move the mouse and wake up the machine. The creation date matches the time I attempt to save it, but the modification date is set to the time when the drive actually spins up.


References: 
 >Re: OSALoad/OSACompile block when machine is asleep (From: Markus Hitter <email@hidden>)

  • Prev by Date: NSWindowController that closes itself
  • Next by Date: Re: CFPreferencesSetValue in pref pane not working if logged in as non-admin
  • Previous by thread: Re: OSALoad/OSACompile block when machine is asleep
  • Next by thread: Re: OSALoad/OSACompile block when machine is asleep
  • Index(es):
    • Date
    • Thread