mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
Fix problem with lazy locks by setting multithreaded bool earlier
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@18839 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
bd1a02569a
commit
5978eda5cf
2 changed files with 10 additions and 1 deletions
|
@ -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 <n.pero@mi.flashnet.it>
|
||||
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue