Cocoa idiom for time consuming tasks
Cocoa idiom for time consuming tasks
- Subject: Cocoa idiom for time consuming tasks
- From: Joe Chan <email@hidden>
- Date: Sun, 3 Feb 2002 17:05:44 -0500
I have a question about Cocoa design idioms for implementing
time consuming operations that can be paused or cancelled by the
user. For example, search through a long document, etc. In the
classic days, I often times just run a second event loop. Now
I'm faced with choices like running it in a thread, using
NSTimer, etc. What are some common ways of accomplishing
something like it. I searched through the list archive, and it
seems that threads are often used with DO for interthread
communication. How expensive is a DO call, and what are things I
should look out for?
-----------
Joe Chan
email@hidden
http://www.firstian.com