| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
In Java, create a Thread and an Object. Pass it through JNI to your native code, which grabs a reference to it and kicks off another thread, registers the thread with the JVM, and creates a CFRunLoop. The Java thread calls wait() on the object, so it blocks.
When the CFRunLoop gets notified via IOKit that the computer just woke up, it calls notify(). The original Java thread wakes up and then does whatever clock management needs to be done before it calls wait() on the object again to wait for the next sleep/wake cycle.
| References: | |
| >JNI and NSSelector (From: "Nathan V. Roberts" <email@hidden>) | |
| >Re: JNI and NSSelector (From: Eric Albert <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.