Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Wed, 4 Sep 2002 11:10:44 +0200 (MEST) From: Bjoern Kahl AG Resy To: cygwin AT cygwin DOT com Subject: Re: A Simple Real World Benchmark for cygwin In-Reply-To: <20020904105530.A1213@cygbert.vinschen.de> Message-ID: Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Hallo! On Wed, 4 Sep 2002, Corinna Vinschen wrote: > On Wed, Sep 04, 2002 at 08:34:10AM +0200, Bjoern Kahl AG Resy wrote: > > [...] > > As I understand MSDN, the order of CoInit and CoUnint does not > > matter, as long as there is an equal number of CoUninit and CoInit > > at Process termination and the (number of CoUninit) <= (number of > > CoInit) at every other point of time. > > > > But then your examples are identical. I do not know details of > > the inner cygwin working, so I discuss two possible setups > > [...] > > Note: it did not matter, if Thread_2 and Thread_X are in > > fact the same thread or two different one as shown here. > > Basically you're argumentation is right except for the different > threads. In single-thread apartment mode, which is the only one > supported by CoInit, each thread using COM has to call CoInit > anyway. Ok. I silently assumed you use CoInitializeEx with multi-thread apartment mode. Seems to was wrong :-) > However, I think the better way is to change the code to use > direct calls to ReadFile and to drop usage of COM. This will > eliminate the whole problem and is likely way faster. Sounds clear. Bjoern -- +---------------------------------------------------------------------+ | Dipl.-Phys. Bjoern Kahl +++ AG Embedded Systems and Robotics (RESY) | | Informatics Faculty +++ Building 48 +++ University of Kaiserslautern| | phone: +49-631-205-2654 +++ www: http://resy.informatik.uni-kl.de | +---------------------------------------------------------------------+ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/