Re: Multi-threaded help
Re: Multi-threaded help
- Subject: Re: Multi-threaded help
- From: John Stiles <email@hidden>
- Date: Wed, 7 Mar 2007 15:55:48 -0800
On Mar 7, 2007, at 3:15 PM, Emiel Lensink wrote:
On Mar 7, 2007, at 4:41 PM, Erik Buck wrote:
It pains me to say this, but multi-threaded programming is NOT
something you can learn by trial and error. Even when you think
you have something working, how will you know for sure ? Multi-
threading issues are often infrequent and intermittent and
virtually impossible to detect or debug. If you don't code it
right the first time, it will probably never be right.
The state of the art of multi-threaded programming is very weak
and immature. I advise any programmer who is even contemplating a
multi-threaded design to reconsider. As it currently stands, it
is nearly impossible to create non-trivial multi-threaded programs
that are correct.
However hard multi threaded programming may be, with the current
trend of multiple cores on a single processor there's not really a
way we can avoid it completely. Applications that distribute heavy
processing across cores are going to perform much better on such an
architecture than programs that don't.
If done systematically and carefully it's not that hard to get a
multithreaded program correct. However, if problems arise, they
tend to be absolutely horrible to debug. If a multithreaded program
turns non-trivial, it may be a good time to re-think the design :)
Emiel.
PS: This is my first message to the list. Allow me to quickly
introduce myself: I'm Emiel, and I've only recently got interested
in apple and its hard- and software. So far, I like the switch and
made my careful first steps into programming on the OSX platform.
In day job I'm a professional software developer in C++ on Windows,
making software for the maritime business.
All this resistance kind of reminds me of how people used to treat
object-oriented programming. "Don't go there! It's so hideously
complex and even the experts screw it up all the time! It's too
immature!"
It isn't an insurmountable problem; you just need to spend a few days
learning about the gotchas. It's not for novices, but you can reap
benefits that no other technique can match, so it's there if you need
it. And honestly Cocoa doesn't make it all that hard either.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden