Subj : Re: printf with thread To : borland.public.cpp.borlandcpp From : "Dennis Jones" Date : Fri Nov 14 2003 10:36 am "gary" wrote in message news:3FB50329.3000609@cordelli.net... > one way to handle this is to write an output function, say > thread_printf(), to use in place of printf() that simply writes the > string output to a buffer and then printf() the buffer from a single > thread that alone is allowed to call printf(). Perhaps an easier alternative would be to write thread_printf() such that it acquires a critical section before calling printf and releases it afterward. Then you wouldn't need a special thread just for printf. - Dennis .