Re: Is Apple's singleton sample code correct?
Re: Is Apple's singleton sample code correct?
- Subject: Re: Is Apple's singleton sample code correct?
- From: j o a r <email@hidden>
- Date: Sat, 3 Dec 2005 01:29:44 +0100
On 3 dec 2005, at 01.19, Shaun Wexler wrote:
Multithreading is the heart of Mac OS X. App's which only run
single-threaded when there is an opportunity for multitasking are
dragging down Apple and the Macintosh platform.
Sure, but thread safety should still be entitled to a completely
separate chapter of it's own - in both documentation and discussions.
It's no use sprinkling some @synchronized here and there and expect
to be thread safe.
Attempting to make all your code thread safe "just in case" is a
waste of time, and right out asking for bugs.
Remember that just because you write your code "single-threaded",
it doesn't mean that a plug-in or framework won't create additional
threads in your process: APE, for example. CoreAudio, MIDI,
QuickTime. AppKit threads for pulsing Aqua buttons.
These threads will not access your code, so that's a moot point.
///////////////////////
How about ending this thread soon? Please!
///////////////////////
j o a r
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden