I have a property declared as the following:
@property(assign) BOOL die;
One thread continuously checks if it should die by looking to see if that variable has changed to YES. When that die is set to YES (by a user clicking a button), the other thread that is grinding away still sees it as NO. I've put careful traces through the code and seen that the variable definitely doesn't show up as modified. What is going on here?
Does each thread contain its own cache of the variable? In Java, my native language, I would have set the 'volatile' keyword on it to remove local thread caching on the property.
Is this something you can do in obj-c or am I on the wrong track?