This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author henrietta
Recipients henrietta
Date 2011-01-17.03:07:43
SpamBayes Score 2.7471764e-05
Marked as misclassified No
Message-id <1295233665.64.0.771906138788.issue10923@psf.upfronthosting.co.za>
In-reply-to
Content
I runned it over again with code:

print 'Acquiring lock'
self.loglock.acquire()
print 'Attempting to convert'
if type(text) == unicode: text = text.encode('utf8', errors='strict')
print 'Opening '+threadspecific
with open(threadspecific, 'ab') as x: x.write(text+'\r\n')
print 'Closing '+threadspecific
self.loglock.release()
print 'Releasing lock'

It behaves erratically, sometimes working and yielding:
Acquiring lock
Acquiring lock
Attempting to convert
Opening threadspecific_master
Closing threadspecific_master
Releasing lock
Attempting to convert
Opening threadspecific_slave
Closing threadspecific_slave
Releasing lock

And sometimes hanging with:

Acquiring lock
Attempting to convert
Acquiring lock

Looks like a particularly nasty race condition. It gives off no exceptions. Platform is Windows 7 x64, running with admin privileges.
History
Date User Action Args
2011-01-17 03:07:45henriettasetrecipients: + henrietta
2011-01-17 03:07:45henriettasetmessageid: <1295233665.64.0.771906138788.issue10923@psf.upfronthosting.co.za>
2011-01-17 03:07:43henriettalinkissue10923 messages
2011-01-17 03:07:43henriettacreate