Hi Sebastian,

Thanks for the comment.  I believe this is a problem for me -- I have a
application developed on Linux which fairly extensively uses pthreads and
libevent for several different event loops.  I will do some tests later,
maybe I don't need libevent to have pthread support, I was going along on
the train of thought 'on linux I use pthreads & enable thread support in
libevent, and Ive tested and everything works well. I should try to
replicate this working setup as much as possible on Windows'.

I don't think I actually write to buffers from multiple threads, so I'll
test later and see if I actually need this.

The other option would be a configure flag, something like
'--enable-windows-pthreads'

yours,
Bobby

On Thu, Dec 8, 2011 at 9:02 AM, Sebastian Hahn <
libevent-us...@sebastianhahn.net> wrote:

> On Dec 8, 2011, at 2:41 PM, Bobby Powers wrote:
> > Hi folks,
> >
> > I ran into a small issue when building libevent 2.0.16-stable under
> mingw32.  The current configure script disables searching for pthreads when
> building for Windows, but this is actually a pthreads implementation
> (pthreads-win32) that may be available.  This patch fixes configure to
> always look for pthreads, as long as threading support is enabled.
> >
> > I'm new to building for Windows, so let me know if I'm overlooking
> anything here :)
> >
> > yours,
> > Bobby
> > <0001-configure-don-t-disable-check-for-pthreads-on-Window.patch>
>
> Hey Bobby,
>
> thanks for your contribution!
>
> First off, note that I am not one of libevent's maintainers, so take
> everything I say with a big grain of salt.
>
> The check to disable pthreads on win32 got committed in
> 78ed097267f2db83c9b05915c76b5287cb2c89f7 (commit by Nick Mathewson, who
> happens to be the libevent maintainer, so I hope he'll weigh in here if
> I'm wrong) with the following commit message:
>
>  Never believe that we have pthreads on win32, even if gcc thinks we
>  do.
>
>  Apparently some newer versions of mingw provide a fake pthreads api to
>  let applications work even if they don't know about windows threading.
>  That's nice, but we aren't one of those.
>
> Unless you have an indication that this has changed, it's probably best
> to leave this alone. If this has changed, some kind of detection would
> be necessary to ensure that building with older versions of mingw
> doesn't produce a broken libevent.
>
> All that said, is the missing pthreads support a problem for you? Maybe
> someone here can suggest a workaround so you don't have to rely on it.
>
> All the best
>
> Sebastian***********************************************************************
> To unsubscribe, send an e-mail to majord...@freehaven.net with
> unsubscribe libevent-users    in the body.
>

Reply via email to