Subject: Re: newbie question
From: [email-masked] (Christopher Faylor)

3 Feb 1998 09:48:19 -0800
Message-ID: <[email-masked]>
References: <[email-masked]>
Reply-To: [email-masked]
To: [email-masked]

In article <[email-masked]>,
Isaac Kohn  <[email-masked]> wrote:
>hi all,
>
>forgive my stupidity, but what does it mean for cygwin.dll to not be
>"thread-safe"??
>
>I'm sure that if it really mattered for me i would understand completely,
>so this is mostly a question of curiosity.  thanks a lot.

It means that if you attempt to call cygwin functions from a process
which is employing multiple threads there is no guarantee that the
functions will work correctly.  The reason is that with multiple threads
it is possible for a function to be called twice from different threads
at nearly the same time.  If the function does not go to some effort to
ensure that its static or global variables are protected from multiple
access you will have situations where the value of the variable is
indeterminate because one thread could be incrementing it while another
is decrementing it, etc.

cygwin.dll does make some effort to prevent "simultaneous" access to
some data structures but some important functions (like malloc for instance)
do not currently work correctly with multiple threads.
-- 
http://www.bbc.com/	[email-masked]			"Strange how unreal
VMS=>UNIX Solutions	Boston Business Computing	 the real can be."
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".