Re: DO vs NSLock with threads and AppKit
Re: DO vs NSLock with threads and AppKit
- Subject: Re: DO vs NSLock with threads and AppKit
- From: Michael Horn <email@hidden>
- Date: Mon, 23 Jul 2001 07:47:36 -0700
At 3:38 PM +0200 7/23/01, Raphael Sebbe wrote:
Thread safety applies when you can or can't access/modify the same
data from multiple threads.
For the AppKit, there is one additional constraint : every call must
occur from the main thread (AppKit thread or drawing thread...). And
this is why DO is used (messages sent from one thread are processed
back into the main thread). You could also use NSPorts or even other
mecanisms. NSLocks can't help you, because they won't switch threads
obviously... They can only be used to protect data accessed from
multiple threads.
Is there somewhere to get more information on this subject? Thanks.