From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11147 invoked by alias); 21 Aug 2002 19:11:24 -0000 Mailing-List: contact pthreads-win32-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: pthreads-win32-owner@sources.redhat.com Received: (qmail 11138 invoked from network); 21 Aug 2002 19:11:22 -0000 Received: from unknown (HELO mx01-a.netapp.com) (198.95.226.53) by sources.redhat.com with SMTP; 21 Aug 2002 19:11:22 -0000 Received: from frejya.corp.netapp.com (frejya [10.10.20.91]) by mx01-a.netapp.com (8.12.3/8.12.3/NTAP-1.4) with ESMTP id g7LJBLl7027663; Wed, 21 Aug 2002 12:11:21 -0700 (PDT) Received: from tahoe.corp.netapp.com (tahoe.corp.netapp.com [10.10.22.112]) by frejya.corp.netapp.com (8.12.5/8.12.2/NTAP-1.4) with ESMTP id g7LJBLrc015884; Wed, 21 Aug 2002 12:11:21 -0700 (PDT) Received: by tahoe.corp.netapp.com with Internet Mail Service (5.5.2650.21) id ; Wed, 21 Aug 2002 12:09:31 -0700 Message-ID: <6440EA1A6AA1D5118C6900902745938E0514FB1D@black.eng.netapp.com> From: "Schwartz, Barry" To: "'Kyle Boon'" , pthreads-win32@sources.redhat.com Subject: RE: Simple question. Date: Wed, 21 Aug 2002 12:11:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-SW-Source: 2002/txt/msg00090.txt.bz2 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 [mailto:kboon@bmi.osu.edu] Sent: Wednesday, August 21, 2002 12:03 PM To: pthreads-win32@sources.redhat.com 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