"Aaron W. LaFramboise" wrote:

> I don't really see any compelling reason that win32 threads shouldn't
> work on Cygwin.  As far as I know, nothing about this choice is
> ultimately exposed to the user.  In fact, Win32 threads are quite likely
> to yield superior performance anywhere where it matters.

There is a very compelling reason.  If you go creating threads behind
Cygwin's back by calling the Win32 API directly, you will quickly get
very wrong results as you try to use other features of Cygwin.  In order
to correctly emulate a posix API under Windows, Cygwin has to handle all
creation and deletion of resources, including threads, and the
corresponding bookkeeping to keep track of them.

The only way this would ever work is if you didn't use any features of
Cygwin (especially any pthreads functions), and stuck to the Win32 API
entirely.  But then, that would be completely missing the point of
Cygwin, which is to provide the posix API.  If you want to use native
Win32 threads, use MinGW.  --enable-threads=win32 is the correct choice
for MinGW.

Brian

Reply via email to