- (void) attach
Called when the handler is being attached to the run loop
- (id<OBSignalHandlerDelegate>) delegate
- (void) detach
Called when removing from the run loop
- (void) fire
Sets the exec signal on the associated thread. Stores the 'fired' state so that subsequent calls may do nothing until perform is invoked. Thread-safe
- (BOOL) fired
Returns the fired state. The default implementation of perform clears the state Do note that this is the state of this OBSignalHandler instance, not of the related exec.library signal!
- (id) init
Allocates a new signal. Must be used on the thread it was allocated on
- (id) initWithSharedSignalBit:(LONG)sigBit task:(APTR)execTask freeWhenDone:(BOOL)freeSignal
Allows creating a handler with a preallocated signal bit that may also be used by other signal handlers. Mind that the exec.library's limit is 32 signal bits per thread. Task may be NULL if it's to be the current task
- (void) invalidate
If initialized with freeWhenDone, this will release the associated signal MUST be called on the same thread the signal was allocated on
- (void) perform
Meant to be overriden. The default implementation clears the fired state, so be sure to call super when overriding. perform shall be called whenever the signal associated with this handler is received, regardless of the fired state. It's up to you whether to check for the fired state
- (void) setDelegate:(id<OBSignalHandlerDelegate>)delegate
Sets the delegate to call perform on
- (LONG) sigBit
Signal bit associated with this handler CAUTION: must remain constant between attach and detach Return -1 on failure