Piotr Maślanka <piotr.masla...@henrietta.com.pl> added the comment:
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. ---------- type: -> crash _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10923> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com