Python threading (was: Re: global interpreter lock not working as it should)

Aahz aahz at pythoncraft.com
Mon Aug 5 19:44:16 CEST 2002


In article <ddc19db7.0208050743.590e56bc at posting.google.com>,
Armin Steinhoff <a-steinhoff at web.de> wrote:
>
>>>> execfile('/root/threads.py')
>Counts:
>[207251, 189529, 228940, 203701, 216320, 169515, 218877, 223871,
>185256, 212550]
>Total = 2055810
>
>Switches:
>[85, 85, 83, 84, 84, 84, 84, 83, 84, 86]
>Total = 842
>>>>
>
>That means the timeslice exhausted 85 times (or jumped to a higher
>priority) at 'other threads may run now' during 207251 loops! (More
>often than I could imagine ... )
>
>This leads to an awful bad thread switching performance!

sys.setcheckinterval()
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

Project Vote Smart: http://www.vote-smart.org/



More information about the Python-list mailing list