Mailing List Archive

Support open source code!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tlug: Thread Programming. I apologize in advance if this is off-topic !!!

my 0.02$ advice:

If you are developing in Linux and you want to make some kind of 
server application I advice you to consider multi-process in favor 
of threads. 

I can see three major drawbacks for threads:
* A failed thread crashes the whole process, that is the whole
* Threads adds a lot of complexity to a C++ program since the
  thread support is built into the language like in Java. 
* It is difficult to debug and presents plenty of opportunity for

Threads have two major advantages:
* Performance (in most OSes)
* Fun!

But if you use Linux the performance part is questionable. Windows
does not like processes and multiple processes cause a lot of
overhead. In Linux this is not really the case and most server 
applications I have seen (like Apache) uses multi-process.

The fun part is very subjective and difficult to consider if you
do this professionally.

tel;fax:+46 8 475 55 01
tel;work:+46 8 475 55 21
org:MYDATA automation AB;Development
adr:;;Adolfsbergsvägen 11;BROMMA;Stockholm;SE-168 66;Sweden
title:Manager System Software R&D
fn:Fredric Fredricson

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links