in reply to Re^4: Handling multiple clients
in thread Handling multiple clients

There is always another way to skin a cat.

Rather than have every thread share the 2GB of data, I would create the server threads before loading it.

Only the the main thread would have a (non-shared) copy of the 2GB, but would share the requests and replies with the server threads.

The advantages. No signals, reapers, select or constantly renewing processes.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
"Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon

Replies are listed 'Best First'.
Re^6: Handling multiple clients
by jalewis2 (Monk) on Sep 05, 2004 at 20:48 UTC
    This sounds more like what I was after to begin with. Any pointers to code that would achieve that?

      Re: Handling multiple clients (use threads) :)


      Examine what is said, not who speaks.
      "Efficiency is intelligent laziness." -David Dunham
      "Think for yourself!" - Abigail
      "Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon