3 ms·
Sorry I wasn't clear, I meant serving more than one request at a time, and apparently this is even possible without using multiple instances, use multiple inher
by prolepunk 15y ago
Sorry I wasn't clear, I meant serving more than one request at a time, and apparently this is even possible without using multiple instances, use multiple inheritance with a threading mixin. This is not going to be properly concurent due to GIL limitations but it should be good enough -- http://blog.doughellmann.com/2007/12/pymotw-basehttpserver.html http://blog.doughellmann.com/2007/12/pymotw-basehttpserver.h...
However this setup can lead to socket lockup (see picked answer) -- http://stackoverflow.com/questions/5693741/whats-difference-between-a-simple-webserver-and-apache-server http://stackoverflow.com/questions/5693741/whats-difference-...
- BarkMore 15y agoI am not sure what you mean by "properly concurrent", but I am guessing that you are referring to the fact that Python code cannot use more than one core because of the GIL. This limitation also applies to Twisted applications. For high volume apps, it often makes sense to run multiple instances of the app behind a reverse proxy. That's the only way to make full use the CPU when running Python. What is "socket lockup"? The word "lockup" is nowhere to be found on the page you references.