Python threading?
Mark Hammond
mhammond at skippinet.com.au
Tue Sep 24 00:33:42 EDT 2002
Paul Rubin wrote:
> Mark Hammond <mhammond at skippinet.com.au> writes:
>
>>A "one thread per connection" model is doomed from the start -
>>therefore, in most applications, I would consider 5 threads a large
>>number - particularly when all are actively doing something. OTOH, if
>>you are willing to accept that your first version will accept a max of
>>~20 connections, the brain-power saved by using threads beats the
>>additional OS overhead by a mile ;)
>
>
> The new Linux native thread implementation was recently benchmarked
> running 100,000 simultaneous threads on a 1 GB machine. Starting all
> the threads and closing them took around 2 seconds.
Just because you *can* doesn't mean you *should* <wink>. Are you
suggesting you would use a threading model to support 100,000
simultaneous connections to your program on such a system?
Mark.
More information about the Python-list
mailing list