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

Re: rettifica (was Re: un server web LEGGERO... quale?)



On Thu, Jul 11, 2002 at 08:43:36PM +0200, Roberto Rotta wrote:
> > Non e` *assolutamente* vero che i server single-threaded gestiscano una
> > sola connessione alla volta!
> 
> Si` ma, single-thread e` una cosa diversa da single-process.
> Tirando ad indovinare quel server *potrebbe* fare una roba del
> genere...
> 
>     #include <pthread.h>
>     
>     ...
>     for( ; ; ) {
>             ...
>             fd = accept(...);
>             
>             pthread_create(&thread_id, NULL, &gestiamoci_la_connessione, fd);
>     }
> 
> il processo e` uno solo, i thread tanti
Potrebbe. Nel caso specifico, pero`, non e` cosi`: singolo processo,
niente thread. Cfr. http://www.acme.com/software/thttpd/notes.html#nbio

Ciao,
/dev/null


-- 
To UNSUBSCRIBE, email to debian-italian-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: