I have a quick question regarding threading, with probably a real basic answer that I've managed to overlook.
I've got a document based app which spins off a thread. If I close the document while the thread is running, it will crash the app the next time it tries to access any of the (now dealloc'ed) elements of that document (specifically NSArraycontrollers). I thought I could keep a reference to the thread and kill it, but it seems you can only kill it from within the thread?
How do I kill the thread externally, or otherwise is there a way to easily check if those IBObjects it is trying to hit actually still exist (and if they don't, I can then exit the thread from within).
I've got a document based app which spins off a thread. If I close the document while the thread is running, it will crash the app the next time it tries to access any of the (now dealloc'ed) elements of that document (specifically NSArraycontrollers). I thought I could keep a reference to the thread and kill it, but it seems you can only kill it from within the thread?
How do I kill the thread externally, or otherwise is there a way to easily check if those IBObjects it is trying to hit actually still exist (and if they don't, I can then exit the thread from within).