Is it possible to cancel a thread while performing? Wait until the selector?
See below:
I have a one time loop with the following line:
[self performSelector: @selector (getMyRecords :) Prestad : MyThread withObject: I waitUntilDone: yes] Sometimes, I have to cancel my thread myThread while my loop is executed I get an issue of accident Is: Exclude the app due to no exceptions' NSDStringNatural Exception ', Reason:' *** - [Mac Controller Exhibitor: Onthread: With Aub Q: Waitunet Done: Mode:]: Check out NSObject's documentation exiting the target thread: while waiting for the display :
This method quips the message on the loop to run the target thread using the default run loop mode, which is the mode associated with the NSRN Loop Commonmox constant. As part of its normal run loop processing, the target thread decides the message (it is believed that this is running in a default run loop mode) and invites the desired method.
You can not queue messages using this method. If you want the option of canceling a message on the current thread, you should either use the PerformSelector: withObject: afterDelay: or performSelector: withObject: afterDelay: inModes: Method. This method retains the receiver and Arg parameter until it is displayed after the selector's performance.
Comments
Post a Comment