Re: Threads and UI
Re: Threads and UI
- Subject: Re: Threads and UI
- From: Nick Zitzmann <email@hidden>
- Date: Thu, 11 Dec 2003 02:18:39 -0800
On Dec 11, 2003, at 12:37 AM, Daniel Todd Currie wrote:
Aside from this specific question, can someone perhaps describe what
is meant by "thread safety"
"Thread safety" means, quite simply, that some function of a program
will work correctly when using more than one thread. For example, if
you have an NSMutableArray that acts as an NSTableView data source, and
the application adds or removes things from that array in a second
thread, then you must take some sort of action to make sure that the
table view (which runs in the main thread) can't access the array at
the same time as it's being updated in the other thread. Ensuring
thread-safety is the #1 reason why multi-threaded programming is so
difficult...
and the potential risks of UI updates outside of the main thread?
This may help you:
<
http://developer.apple.com/documentation/Cocoa/Conceptual/
Multithreading/Tasks/appkit.html>
Nick Zitzmann
<
http://seiryu.home.comcast.net/>
S/MIME signature available upon request
"That's a funny thing to promise. Well, you can't never let anything
happen to him [Nemo]; then, nothing would ever happen to him." - Dory,
from the movie "Finding Nemo"
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.