rharder
Do not read this sign.
I've made considerable improvements to the ThreadWorker class I brought up earlier. With just a single call, you can throw a job off onto another thread like this:
Control to the GUI will return immediately while your real work goes on. You can make calls to be executed on your calling thread just as easily from your working thread.
Anyhow, thought y'all might find it useful. It's Public Domain. You can find it at http://iharder.sourceforge.net/macosx/threadworker/
Enjoy.
-Rob
Code:
- (IBAction)buttonPressed:(id)sender
{
[ThreadWorker workOn:self
withSelector:@selector(longTask:)
withObject:someArgument
didEndSelector:@selector(allDone:)];
}
Anyhow, thought y'all might find it useful. It's Public Domain. You can find it at http://iharder.sourceforge.net/macosx/threadworker/
Enjoy.
-Rob