threads - use them as much as you can

Ulf Wiger etxuwig@REDACTED
Mon Nov 27 12:48:51 CET 2000


I can't resist - reading about Java and Swing, I came across the
following passage:

"The first rule of using threads is this: avoid them if you can.
Threads can be difficult to use, and they tend to make programs harder
to debug. To avoid the possibility of deadlock, you must take extreme
care that any threads you create don't invoke any methods on Swing
components."

http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html


This is certainly in stark contrast with the Erlang adage:

"Use one parallel process to model each truly concurrent activity in
the real world" 

http://www.erlang.se/doc/programming_rules.shtml#REF34191


Perhaps a bit more should be made of this...?  (:

/Uffe
-- 
Ulf Wiger                                    tfn: +46  8 719 81 95
Senior System Architect                      mob: +46 70 519 81 95
Strategic Product & System Management    ATM Multiservice Networks
Data Backbone & Optical Services Division      Ericsson Telecom AB




More information about the erlang-questions mailing list