src/macosx/native/sun/osxapp/ThreadUtilities.h

Print this page




 112     while (pthread_main_np() != 0) {} \
 113 } while (0)
 114 
 115 #endif /* AWT_THREAD_ASSERTS_WAIT */
 116 
 117 #else /* AWT_THREAD_ASSERTS */
 118 
 119 #define AWT_ASSERT_APPKIT_THREAD     do {} while (0)
 120 #define AWT_ASSERT_NOT_APPKIT_THREAD do {} while (0)
 121 
 122 #endif /* AWT_THREAD_ASSERTS */
 123 // --------------------------------------------------------------------------
 124 
 125 __attribute__((visibility("default")))
 126 @interface ThreadUtilities { }
 127 
 128 + (JNIEnv*)getJNIEnv;
 129 + (JNIEnv*)getJNIEnvUncached;
 130 + (void)detachCurrentThread;
 131 + (void)setAppkitThreadGroup:(jobject)group;
 132 + (void)setAWTEmbedded:(BOOL)embedded;
 133 + (BOOL)isAWTEmbedded;
 134 
 135 //Wrappers for the corresponding JNFRunLoop methods with a check for main thread
 136 + (void)performOnMainThreadWaiting:(BOOL)wait block:(void (^)())block;
 137 + (void)performOnMainThread:(SEL)aSelector on:(id)target withObject:(id)arg waitUntilDone:(BOOL)wait;
 138 @end
 139 
 140 void OSXAPP_SetJavaVM(JavaVM *vm);
 141 
 142 #endif /* __THREADUTILITIES_H */


 112     while (pthread_main_np() != 0) {} \
 113 } while (0)
 114 
 115 #endif /* AWT_THREAD_ASSERTS_WAIT */
 116 
 117 #else /* AWT_THREAD_ASSERTS */
 118 
 119 #define AWT_ASSERT_APPKIT_THREAD     do {} while (0)
 120 #define AWT_ASSERT_NOT_APPKIT_THREAD do {} while (0)
 121 
 122 #endif /* AWT_THREAD_ASSERTS */
 123 // --------------------------------------------------------------------------
 124 
 125 __attribute__((visibility("default")))
 126 @interface ThreadUtilities { }
 127 
 128 + (JNIEnv*)getJNIEnv;
 129 + (JNIEnv*)getJNIEnvUncached;
 130 + (void)detachCurrentThread;
 131 + (void)setAppkitThreadGroup:(jobject)group;


 132 
 133 //Wrappers for the corresponding JNFRunLoop methods with a check for main thread
 134 + (void)performOnMainThreadWaiting:(BOOL)wait block:(void (^)())block;
 135 + (void)performOnMainThread:(SEL)aSelector on:(id)target withObject:(id)arg waitUntilDone:(BOOL)wait;
 136 @end
 137 
 138 void OSXAPP_SetJavaVM(JavaVM *vm);
 139 
 140 #endif /* __THREADUTILITIES_H */