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

Print this page

        

@@ -96,12 +96,10 @@
         AWT_DEBUG_BUG_REPORT_MESSAGE;          \
         AWT_THREAD_ASSERTS_ENV_ASSERT_CHECK;   \
     }                                          \
 } while (0)
 
-#define AWT_ASSERT_ANY_THREAD
-
 #endif /* AWT_THREAD_ASSERTS_MESSAGES */
 
 #ifdef AWT_THREAD_ASSERTS_WAIT
 
 #define AWT_ASSERT_APPKIT_THREAD      \

@@ -112,19 +110,16 @@
 #define AWT_ASSERT_NOT_APPKIT_THREAD  \
 do {                                  \
     while (pthread_main_np() != 0) {} \
 } while (0)
 
-#define AWT_ASSERT_ANY_THREAD
-
 #endif /* AWT_THREAD_ASSERTS_WAIT */
 
 #else /* AWT_THREAD_ASSERTS */
 
 #define AWT_ASSERT_APPKIT_THREAD     do {} while (0)
 #define AWT_ASSERT_NOT_APPKIT_THREAD do {} while (0)
-#define AWT_ASSERT_ANY_THREAD
 
 #endif /* AWT_THREAD_ASSERTS */
 // --------------------------------------------------------------------------
 
 // This tracks if we are current inside of a performOnMainThread that is both waiting and in the AWTRunLoopMode

@@ -137,11 +132,14 @@
 
 + (JNIEnv*)getJNIEnv;
 + (JNIEnv*)getJNIEnvUncached;
 
 + (void)performOnMainThread:(SEL)aSelector onObject:(id)target withObject:(id)arg waitUntilDone:(BOOL)wait awtMode:(BOOL)inAWT;
+
+//Wrappers for the corresponding JNFRunLoop methods with a check for main thread
 + (void)performOnMainThreadWaiting:(BOOL)wait block:(void (^)())block;
++ (void)performOnMainThread:(SEL)aSelector on:(id)target withObject:(id)arg waitUntilDone:(BOOL)wait;
 @end
 
 void OSXAPP_SetJavaVM(JavaVM *vm);
 
 #endif /* __THREADUTILITIES_H */