00001 #import <Cocoa/Cocoa.h> 00002 00003 00097 @interface LLThreadWorker : NSObject 00098 { 00099 id _target; // The object whose selector will be called 00100 SEL _selector; // The selector that will be called in another thread 00101 id _argument; // The argument that will be passed to the selector 00102 SEL _didEndSelector; // Selector for final notice 00103 NSConnection *_callingConnection; // Connection used to safely communicate between threads 00104 NSPort *_port1; 00105 NSPort *_port2; 00106 NSConnection *_conn2; 00107 NSConditionLock *_cancelled; 00108 BOOL _endRunLoop; 00109 } 00110 00111 00112 00200 + (LLThreadWorker *) 00201 workOn:(id)target 00202 withSelector:(SEL)selector 00203 withObject:(id)userInfo 00204 didEndSelector:(SEL)didEndSelector; 00205 00206 00225 -(void)markAsCancelled; 00226 00227 00233 -(BOOL)cancelled; 00234 00235 00236 00242 - (void) dealloc; 00243 00244 00252 + (NSString *)description; 00253 00254 00255 00256 00257 @end 00258