Re: Event loop



On Sat, 11 Nov 2000, Earle R. Nietzel wrote:

I think you mean threads not another process...

Threads are a much better solution than creating another process...

Not always!

Why are not httpd in one big process with a lot of treads?
Why are inted spawning processes instead of just using shared
libs and creating threads???

So this must be a design issue... Good design is not always
easy. Sometimes you must experiment with threads implementations
versus processes. 

But to do someting like

  while(1)
  {
     do_one_thing();
     do_another_thing();
     ...
  }

must be wrong. Here you should use thread *or* processes.
If the jobs *must* be done in sequence you should consider
semaphores och some signaling mechanism.

IMHO

G Hasse


----------------------------------------------------------------
Göran Hasse            email: gh raditex se     Tel: 08-6949270
Raditex AB             http://www.raditex.se    Fax: 08-6949280
Sickla Alle 7, 1tr                              Mob: 070-5530148
131 34  NACKA, SWEDEN






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