[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] Does bufferevent_openssl_socket_new() API support multi-thread?



I have try the patch, but seems no use ><
But I use
    bev1 = bufferevent_socket_new()
    bev2 = bufferevent_openssl_filter_new()
instead of
    bev = bufferevent_openssl_socket_new()

The lock problem seems solved in multi-thread.
But I don't know what the key point between them.

Brian


2011/1/13 Nick Mathewson <nickm@xxxxxxxxxxxxx>
2011/1/9 林宇舜 Yu-Shun Lin <ys.ncku@xxxxxxxxx>:
> Hi all.
> Does bufferevent_openssl_socket_new() API support multi-thread?
> I refer the sample of regress_ssl.c in the libevent source package, and
> write an SSL server with multi-thread.
> But it is deadlock after receive the first message from client.

Yuck.  This is definitely a bug, but not an easy one to fix.  It has
to do with how we try to avoid race conditions when deleting and
freeing events.  I've had some ideas, but the solution is going to be
nontrivial, though, and probably have some API effect for some
multithreaded programs.  I'll post again once my thoughts on this are
clearer and I am buried under less work.

In the meantime, the poster has has posted information about a
workaround at http://sourceforge.net/tracker/?func=detail&aid=3154040&group_id=50884&atid=461322
that might be helpful to people.

sorry for my latency,
--
Nick
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.