[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: NSSound Code Review
From: |
David Chisnall |
Subject: |
Re: NSSound Code Review |
Date: |
Wed, 29 Jul 2009 17:15:12 +0100 |
On 29 Jul 2009, at 16:56, Wolfgang Lux wrote:
David Chisnall wrote:
Note that this is deprecated on Cocoa - Cocoa applications are
always multithreaded because Cocoa uses a few threads internally.
This also eliminates problems where people are spawning threads
using the POSIX or Mach APIs (in their own code or in libraries)
which don't trigger the notification. On Cocoa, since 10.2 if I
remember correctly, but possibly earlier, isMultithreaded always
returns YES.
Don't know what makes you believe this. I just tested it on Tiger
and Leopard and both return NO by default. Most Cocoa applications
on my machine run with a single thread. Maybe you have some
utilities like Unsanity's application enhancer running on your
machine which start those secondary threads.
Hmm, that's interesting. The documentation appears to have been
updated to clarify that that it now only reflects whether the use has
spawned an NSThread, not whether the application is actually
multithreaded. Cocoa, internally, still runs in multithreaded mode
all of the time, however, and does not rely on this notification.
There are a number of related changes, for example DO proxy objects in
OpenStep can only be used from one thread unless explicitly set as
shareable, while Cocoa makes this the default in recent versions.
If you spawn a POSIX (or Mach) thread in OS X and make Cocoa calls
from this, without ever sending a notification informing the framework
of this, then things work correctly. I do not believe that this is
yet the case in GNUstep, but it ought to be.
David
- NSSound Code Review, Stef Bidi, 2009/07/27
- Re: NSSound Code Review, Stef Bidi, 2009/07/28
- Re: NSSound Code Review, David Ayers, 2009/07/28
- Re: NSSound Code Review, David Chisnall, 2009/07/29
- Re: NSSound Code Review, Wolfgang Lux, 2009/07/29
- Re: NSSound Code Review,
David Chisnall <=
- Re: NSSound Code Review, David Ayers, 2009/07/29
- Re: NSSound Code Review, David Chisnall, 2009/07/29
- Re: NSSound Code Review, Stef Bidi, 2009/07/29
- Re: NSSound Code Review, David Ayers, 2009/07/30
- Re: NSSound Code Review, David Chisnall, 2009/07/30