Author: gcasa
Date: Tue Oct 14 00:59:24 2014
New Revision: 38115

URL: http://svn.gna.org/viewcvs/gnustep?rev=38115&view=rev
Log:
Set executor to nil when thread exits.

Modified:
    apps/gworkspace/trunk/ChangeLog
    apps/gworkspace/trunk/Operation/FileOpInfo.m

Modified: apps/gworkspace/trunk/ChangeLog
URL: 
http://svn.gna.org/viewcvs/gnustep/apps/gworkspace/trunk/ChangeLog?rev=38115&r1=38114&r2=38115&view=diff
==============================================================================
--- apps/gworkspace/trunk/ChangeLog     (original)
+++ apps/gworkspace/trunk/ChangeLog     Tue Oct 14 00:59:24 2014
@@ -1,3 +1,8 @@
+2014-10-13 18:58-EDT Gregory John Casamento <[email protected]>
+
+       * Operation/FileOpInfo.m: Set executor to nil when thread
+       exits.
+
 2014-09-10 Riccardo Mottola <[email protected]>
 
        * Operation/FileOpInfo.m

Modified: apps/gworkspace/trunk/Operation/FileOpInfo.m
URL: 
http://svn.gna.org/viewcvs/gnustep/apps/gworkspace/trunk/Operation/FileOpInfo.m?rev=38115&r1=38114&r2=38115&view=diff
==============================================================================
--- apps/gworkspace/trunk/Operation/FileOpInfo.m        (original)
+++ apps/gworkspace/trunk/Operation/FileOpInfo.m        Tue Oct 14 00:59:24 2014
@@ -281,6 +281,17 @@
   [self detachOperationThread];
 }
 
+- (void) threadWillExit: (NSNotification *)notification
+{
+  NSLog(@"%@",NSStringFromSelector(_cmd));
+  [[NSNotificationCenter defaultCenter] 
+    removeObserver:self
+             name:NSThreadWillExitNotification
+           object:nil];
+
+  executor = nil;
+}
+
 -(void)detachOperationThread
 {
   NSPort *port[2];
@@ -299,7 +310,12 @@
   [nc addObserver: self
          selector: @selector(connectionDidDie:)
              name: NSConnectionDidDieNotification
-           object: execconn];    
+           object: execconn];      
+
+  [nc addObserver: self
+         selector: @selector(threadWillExit:)
+             name: NSThreadWillExitNotification
+           object: nil];  
 
   NS_DURING
     {


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to