Supprimer un message
zion
Frequently beginning programmers will try to write network programs as multithreaded programs. Granted, this is tempting -- all the convenience of being in one process on one hand, and all the convenience of writing natural, blocking code.
Il l'a écrit pour moi?
Alternatives
* Multiple processes -- if you have relatively few concurrent processes and have little need for communication between them, this is a good solution. There are many variants on the solutions here, and the most common optimization is preforking.
* Event-based programming
* Co-operative threads, such as co-routines.
* Multiple processes -- if you have relatively few concurrent processes and have little need for communication between them, this is a good solution. There are many variants on the solutions here, and the most common optimization is preforking.
* Event-based programming
* Co-operative threads, such as co-routines.
1. Le fork on oublie sous w32 et la communication inter process c'est une merde sans nom.
2. C'est malheureusement pas possible avec tout, y a parfois des fonctions externes bloquantes ou on l'a dans notre * quoi qu'on fasse.
3.