mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-20 20:26:42 +00:00
Patches submitted from May 20 to Aug 28 1997
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2406 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f0a72da206
commit
25afcc3594
119 changed files with 16409 additions and 1698 deletions
|
@ -68,6 +68,12 @@ static BOOL entered_multi_threaded_state;
|
|||
|
||||
// Initialization
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[_thread_dictionary release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- init
|
||||
{
|
||||
[super init];
|
||||
|
@ -120,7 +126,17 @@ static BOOL entered_multi_threaded_state;
|
|||
toTarget:(id)aTarget
|
||||
withObject:(id)anArgument
|
||||
{
|
||||
entered_multi_threaded_state = YES;
|
||||
/* Post a notification if this is the first new thread to be created.
|
||||
Won't work properly if threads are not all created by this class.
|
||||
xxx Should the notification be done before the new thread starts,
|
||||
or after? */
|
||||
if (!entered_multi_threaded_state)
|
||||
{
|
||||
entered_multi_threaded_state = YES;
|
||||
[NotificationDispatcher
|
||||
postNotificationName: NSBecomingMultiThreaded
|
||||
object: nil];
|
||||
}
|
||||
|
||||
// Have the runtime detach the thread
|
||||
objc_thread_detach (aSelector, aTarget, anArgument);
|
||||
|
@ -139,10 +155,15 @@ static BOOL entered_multi_threaded_state;
|
|||
return entered_multi_threaded_state;
|
||||
}
|
||||
|
||||
/* Thread dictionary
|
||||
NB. This cannot be autoreleased, since we cannot be sure that the
|
||||
autorelease pool for the thread will continue to exist for the entire
|
||||
life of the thread!
|
||||
*/
|
||||
- (NSMutableDictionary*) threadDictionary
|
||||
{
|
||||
if (!_thread_dictionary)
|
||||
_thread_dictionary = [NSMutableDictionary dictionary];
|
||||
_thread_dictionary = [NSMutableDictionary new];
|
||||
return _thread_dictionary;
|
||||
}
|
||||
|
||||
|
@ -191,16 +212,4 @@ static BOOL entered_multi_threaded_state;
|
|||
objc_thread_exit ();
|
||||
}
|
||||
|
||||
/* Not in OpenStep. */
|
||||
- (NSHandler*)exceptionHandler
|
||||
{
|
||||
return _exception_handler;
|
||||
}
|
||||
|
||||
/* Not in OpenStep. */
|
||||
- (void)setExceptionHandler: (NSHandler*)handler
|
||||
{
|
||||
_exception_handler = handler;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue