[issue3139] print is not thread safe

2008-06-19 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' <[EMAIL PROTECTED]>: -- nosy: +giampaolo.rodola ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-

[issue3139] print is not thread safe

2008-06-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: The problem is not only about concurrent prints. It is about invalid pointer passed to a C function. Here is an example that reliably crashes the interpreter on my windows machine: import bz2, threading bz2c = bz2.BZ2Compressor() b = by

[issue3139] print is not thread safe

2008-06-19 Thread Guilherme Polo
Guilherme Polo <[EMAIL PROTECTED]> added the comment: Wasn't that always known ? Maybe I'm missing something here. -- nosy: +gpolo ___ Python tracker <[EMAIL PROTECTED]> ___ __

[issue3139] print is not thread safe

2008-06-19 Thread Amaury Forgeot d'Arc
New submission from Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: I found this problem when adding "print" statements to multi-threaded code. When applying the attached diff to a py3k installation, the output on screen always contains some garbage. The following code is an extract of fileio_write (i