This is the mail archive of the
mailing list for the Cygwin project.
Re: A Simple Real World Benchmark for cygwin
On Wed, Sep 04, 2002 at 08:34:10AM +0200, Bjoern Kahl AG Resy wrote:
> I think, there is a missunderstanding on your side, Corinna
> (see below)
> 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
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.
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Developer mailto:email@example.com
Red Hat, Inc.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html