hi,

that is my frist -- not jet tested -- code. just to avoid double work...

Index: Source/NSThread.m
===============================================================
====
--- Source/NSThread.m   (revision 25604)
+++ Source/NSThread.m   (working copy)
@@ -797,6 +797,34 @@
   return _thread_dictionary;
 }
 
+- (id)initWithTarget:(id)target selector:(SEL)selector object:(id)argument
+{
+  gnustep_base_thread_callback();
+
+  return [self _initWithSelector:selector
+                        toTarget:target
+                      withObject:argument];
+
+}
+
+- (void)start 
+{
+  
+  if (_active == YES) {
+    [NSException raise: NSInternalInconsistencyException
+                format: @"%s: Thread is already active.", __PRETTY_FUNCTION__];
+  }
+  /*
+   * Have the runtime detach the thread
+   */
+  if (objc_thread_detach(@selector(_sendThreadMethod), self, nil) == NULL)
+  {
+    [NSException raise: NSInternalInconsistencyException
+                format: @"Unable to detach thread (unknown error)"];
+  }
+  
+}
+
 @end
 
 

Index: Headers/Foundation/NSThread.h
===============================================================
====
--- Headers/Foundation/NSThread.h       (revision 25604)
+++ Headers/Foundation/NSThread.h       (working copy)
@@ -60,6 +60,8 @@
 + (double) threadPriority;
 
 - (NSMutableDictionary*) threadDictionary;
+- (id)initWithTarget:(id)target selector:(SEL)selector object:(id)argument;
+- (void)start;
 
 @end


Dave




_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
http://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to