Subj : Re: printf with thread To : borland.public.cpp.borlandcpp From : Gerhard Wolfstieg Date : Thu Nov 06 2003 05:07 pm abhimanyu wrote: > > I m writing a program in which i m creating multiple > thread in which i m printing something using printf. Now > when i run that program after some time it hang without > any error, but if i comment out the printf statement it is > running fine. I wnat to ask if there is some problem using > printf with the threads, and is printf is thread safe. Plz > help me. > > Thanks in advace > Abhimanyu Is it GUI or Shell/Console? Without proving it, I would think that it is not thread save (on "windows"). Why not writing one only thread allowed to print out -- or on "windows" using either SendMessage etc. or wprintf. Gruß, Gerhard .