3 Feb 2006 16:28
Re: PostgreSQL
Michael Richardson <mcr <at> sandelman.ottawa.on.ca>
2006-02-03 15:28:10 GMT
2006-02-03 15:28:10 GMT
I think it comes down to: THREADING IS HARD
WAY too many people try to write threaded code and fail.
As a example, look at gnokii. It used to run fine on NetBSD, then it
grew threading, and stopped working.
Why? So that morons could write:
while(1) {
if(dtr is true) break;
}
(I haven't tried to run it on NetBSD in three years. I suspect it has
gotten better)
Writing good multithreaded user-space code is really *HARDER* than
writing kernel code. If you think about this, you realize why
"professional" application code is often so crappy, huge, bloated,
buggy.
Leaning to write co-routines and select/poll interfaces is takes a bit
more brain power at first than writing the above busy-loop, but is SO
MUCH easier to debug that the effort pays off.
I think that the postgresql people know this.
--
--
] ON HUMILITY: to err is human. To moo, bovine. | firewalls [
] Michael Richardson, Xelerance Corporation, Ottawa, ON |net architect[
] mcr <at> xelerance.com http://www.sandelman.ottawa.on.ca/mcr/ |device driver[
] panic("Just another Debian GNU/Linux using, kernel hacking, security guy"); [
RSS Feed