problems with pthreads && c++ (suspect wait conditions)

Conrad Scott Conrad.Scott@dsl.pipex.com
Fri Jul 5 10:29:00 GMT 2002


"Max Zaitsev" <maksik@gmx.co.uk> wrote:
> It would be nice if somebody at cygwin would document
> such a behavior of gcc, that is even if one don't have
> any try-catch blocks one still have to use
> -fno-exceptions to forbid them completeli kind of...

Another thing that I only realised recently, is that the new and
delete operators are not thread-safe in the current cygwin / gcc
world.  You have to push things pretty hard to trip over it, but
there is a problem there.  For what I'm working on (cygserver), I
ripped out all the new/deletes and used malloc/free with placement
new and explicit destructor calls.  Ugly but it works (not that
that's a recommedation).

Earnie Boyd suggested -D__USE_MALLOC, as discussed recently on the
mingw-users list, but I've not got around to investigating that as
yet.

HTH,

// Conrad




--
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/



More information about the Cygwin mailing list