Fernando Rodríguez wrote:

> Is the standard output thread-safe? Can I use print from several threads
> without having to use a mutex?

if you use sys.stdout.write on the standard sys.stdout stream, each write
operation is "atomic" (thanks to the GIL).

if you use other approaches (including print statements, or sys.stdout re-
direction via python code), data from different streams may appear out of
order.  python won't crash, though.

</F>



-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to