Main Thread stoppin Background Thread
Main Thread stoppin Background Thread
- Subject: Main Thread stoppin Background Thread
- From: John Love <email@hidden>
- Date: Fri, 28 Nov 2008 14:48:50 -0500
Reference page 43 of Apple's MultiThreading.pdf.
I conclude from this page that the preferred, if not only, way to have
the main thread stop the background thread is through KVC.
Before I continue to inflict more pain on myself, why can't I simply
toggle the value of an instance variable of the class' interface from
the main thread and have the backgroundThreadRoutine look at the same
variable and break out of the background thread if its a certain value?
I have been totally unsuccessful in this simpler-to-understand
approach; therefore, I am beginning to study KVC and its use on page
43 of Apple's doc.
Should I conclude that this class variable is in the main thread and
is not accessible by the background thread?
If KVC is the only approach for inter-thread communication, I'll press
on.
A short amount of guidance is definitely needed.
Thanks,
John Love
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden