Message7004
Is it important for the name to be based on an incrementing counter.
I have a working change that fixes this issue. I initially used an integer counter, incrementing by one each time. But there is a remote possibility of a clash in thread names with this scenario, since the counter wraps around at 2**31.
I'd prefer to use the hashCode of the thread object itself, which will lower the probability of clashes.
So thread names would look like this
>>> from threading import Thread as t
>>> t().getName()
u'Thread-14662467'
>>> t().getName()
u'Thread-6815360'
>>> t().getName()
u'Thread-8640702'
>>> t().getName()
u'Thread-20730792'
>>> t().getName()
u'Thread-32316862'
>>> t().getName()
u'Thread-31983457'
>>> t().getName()
u'Thread-29881213'
>>> t().getName()
u'Thread-27649674'
>>> t().getName()
u'Thread-10545552' |
|
Date |
User |
Action |
Args |
2012-03-31 20:48:45 | amak | set | messageid: <1333226925.26.0.83677701997.issue1805@psf.upfronthosting.co.za> |
2012-03-31 20:48:45 | amak | set | recipients:
+ amak, irmen |
2012-03-31 20:48:45 | amak | link | issue1805 messages |
2012-03-31 20:48:45 | amak | create | |
|