- Loading...
...
If you are working on a native function or method, please take a moment to determine which of the following behaviors describe it:
Use AWT_ASSERT_APPKIT_THREAD; (defined in ThreadUtilities.h)
Use AWT_ASSERT_NOT_APPKIT_THREAD; (defined in ThreadUtilities.h)
Make sure any shared data (instance variables or global data) is accessed only as an atomic property, or behind a lock that will not block for an indefinite period of time.
...
The JavaNativeFoundation.framework's JNFRunLoop class was born out of the necessity for both app developers who use JNI as well as JDK hackers to efficiently perform blocks of code on the main AppKit thread, while running in this special mode. JNFRunLoop.h exposes both an Obj-C selector and blocks-based API for performing with and without waiting:
Code Block | ||
---|---|---|
| ||
/System/Library/Frameworks/JavaVM.framework/Frameworks/JavaNativeFoundation.framework/Headers/JNFRunLoop.h |