• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: DO vs NSLock with threads and AppKit
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >Re: DO vs NSLock with threads and AppKit (From: Raphael Sebbe <email@hidden>)

  • Prev by Date: Printer driver sample code?
  • Next by Date: Thread priorities
  • Previous by thread: Re: DO vs NSLock with threads and AppKit
  • Next by thread: Re: DO vs NSLock with threads and AppKit
  • Index(es):
    • Date
    • Thread