This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Thread safety of cout


Hi,

Is it safe to have multiple threads writing to cout without any additional
locking?

My program is getting into deadlock sometimes, it seems while writing to
cout.  I'm running gcc 3.2.1, on linux kernel 2.4.24.  I have a gdb trace of
each thread if that helps.

I can't seem to find a consistent message about this on the web.  This link
seemed to suggest to me that it would be safe on linux, though perhaps I
misread that:
http://gcc.gnu.org/onlinedocs/libstdc++/27_io/howto.html#9

thanks,
Dan Evison


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]