This is the mail archive of the mailing list for the pthreas-win32 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]

RE: Simple question.

If it were me...
I would create another thread that manged an output queue.  I would arrange for the contributing threads to write their output to this thread's input method -- as one "atomic" text block.  Then I would call some other method to "print" it or queue it up for printing.  The management of sending chars to the screen would be done by this queue manager and it would be the only place I would put an output call in all of my code.  Also, I would consider alternatives to cout if you have any.

-----Original Message-----
From: Kyle Boon []
Sent: Wednesday, August 21, 2002 12:03 PM
Subject: Simple question.

I'm not sure if this is the right place for my question - so I apolgize in 
advance if it not.

First some quick background. I am a college undergrad charged with porting a 
linux app to the win32 platform. I chose this pthreads implementation to make 
the task much easier. So far it's worked very well. My only question is how 
people deal with console output. I have multiple threads using cout to print 
things to the console, but the output is all jumbled up. If I try to link 
with a thread safe version of the standard library on windows, I get all 
sorts of linker errors. It seems like people must have had to work around 
this before, but I haven't been able to find any information about it.

Any help would be greatly appreciated.
Kyle Boon

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