5 ms·
this is total nonsense. Maybe for the php crowd that know only garbage collected 'trivial' languages, but for anyone that has a CS degree, threads are not diffi
by sfphotoarts 18y ago
this is total nonsense. Maybe for the php crowd that know only garbage collected 'trivial' languages, but for anyone that has a CS degree, threads are not difficult at all. Imagine trying to write a SQL Database without threads, or many many other applications. Locking isn't all that difficult if you think it through - that used to be called design, but today, that just means what color is the drop shadow box :)
Locking order is important to prevent the classic deadlock, but there is nothing inherently 'too hard' for programmers in using threads.
- anthonyrubin 18y agoPostgreSQL is not threaded.
- sfphotoarts 18y agoright, but the postmaster, supervisory process manages the common work area such that each process is acting as a thread, it just predates threads in its architecture. The rocess per-user model is much like Apache 1.x, which has its drawbacks, but does work well and has for years.
- anthonyrubin 18y agoApache 2.x can be configured to use the prefork MPM which behaves in a similar fashion to 1.x. There are even advantages to this method. Postfix is another great example of a high quality piece of software that is not threaded. There are many other examples. It is entirely possible to write complex systems that perform well without threads.
- gaius 18y agoNeither are X servers that handle thousands of events for dozens of windows per second.
- davidw 18y ago> CS degree Dr. Ousterhout has one of those: http://en.wikipedia.org/wiki/John_Ousterhout http://en.wikipedia.org/wiki/John_Ousterhout Actually it says he was a professor at UC Berkeley, where he wrote Tcl, Tk, and an OS, amongst other things. After that, he went on to work at Sun, and then founded his own successful company.
- anthonyrubin 18y ago"He received his Bachelor's degree in Physics from Yale University in 1975, and his Ph.D. in computer science from Carnegie Mellon University in 1980."
- russell 18y agoWriting threaded code is not all that difficult. It's finding the bugs that is. It's because the problems are not easily reproducible. The synchronization model in Java makes it all too easy to muck it up. Some simple ideas: Threads are very handy if they don't talk to each other like java servlets. If you have a shared variable, make it a monitor. If you have a share resource resource, make it immutable. If you have 45 shared variables, you are doing it wrong. Use library objects like queues to communicate between threads. Use a shared-nothing model like in erlang.