diff --git a/ChangeLog b/ChangeLog index 2c64eabd8..b33deceac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,9 @@ * Source/Additions/GSCategories.m: * Source/Additions/GSMime.m: New uuencode/uudecode moved from GSMime to a category of NSData and renamed. + * Source/NSThread.m: Set flag to saay we are multithreaded before + we send out the notifications. Fixes bug in lazy locking and is + more compatible with macos-x Fri Mar 12 13:35:25 2004 Nicola Pero diff --git a/Source/NSThread.m b/Source/NSThread.m index 164576173..fc0faea08 100644 --- a/Source/NSThread.m +++ b/Source/NSThread.m @@ -382,6 +382,13 @@ gnustep_base_thread_callback(void) [gnustep_global_lock lock]; if (entered_multi_threaded_state == NO) { + /* + * For apple compatibility ... and to make things easier for + * code called indirectly within a will-become-multi-threaded + * notification handler, we set the flag to say we are multi + * threaded BEFORE sending the notifications. + */ + entered_multi_threaded_state = YES; NS_DURING { [GSPerformHolder class]; // Force initialization @@ -408,7 +415,6 @@ gnustep_base_thread_callback(void) fflush(stderr); } NS_ENDHANDLER - entered_multi_threaded_state = YES; } [gnustep_global_lock unlock]; }