[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [Libevent-users] workers for evhttp (was stable, now not!)
- To: libevent-users@xxxxxxxxxxxxx
- Subject: Re: [Libevent-users] workers for evhttp (was stable, now not!)
- From: Nick Mathewson <nickm@xxxxxxxxxxxxx>
- Date: Fri, 20 May 2011 23:38:20 -0400
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: libevent-users-outgoing@xxxxxxxx
- Delivered-to: libevent-users@xxxxxxxx
- Delivery-date: Fri, 20 May 2011 23:38:27 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=kQUyCjxfs810/Qpd2US0Mc++5c95FXgfWRUTn4WYKL0=; b=G+Pa7R7s1weBvjspywO1jrB8RYYJ4NXnwhw3YroyaeeLVJ2fqgCNnkdK5IzjiO5+jc uEHPjKUzdZcMd/z2dNrSln/1Op83BuxB0ijsbfdmESRFJo73XxlFTjldlF8Hp58m2r3t sOxxGrF84jnY+kYx9pnG32YrGi++ypo5PaB+c=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; b=eyiIAhmzniQxYfKbjxO3ulQY6lIMAqDxRWdGecxcq16Zi3vruf+ZWrsYYG0cM2DYjy faupgZ35uaaBBk4DACDK9Mn5I2D1yDQqFaH4pOLAPkyjxtyv3fYzSE5hs6U67Ljqi47j ldCk+T9dAPDVlSVlAjj+bPFc79Hx7d9Q9fEcw=
- In-reply-to: <4DD730E0.90701@xxxxxxxxx>
- References: <4DD730E0.90701@xxxxxxxxx>
- Reply-to: libevent-users@xxxxxxxxxxxxx
- Sender: owner-libevent-users@xxxxxxxxxxxxx
On Fri, May 20, 2011 at 11:26 PM, Michael Herf <herf@xxxxxxxxx> wrote:
[...]
> Questions: is bufferevent supposed threadsafe for this case? I suppose I
> haven't verified if my technique of handing evhttp_request over the thread
> boundary is supposed to work or not...it has just been working for quite a
> long time under earlier versions of libevent.
Bufferevents are supposed to be threadsafe if you construct them with
the BEV_OPT_THREADSAFE option, but evhttp isn't threadsafe in 2.0.
(Specifically, you can use separate evhttp bases and connections in
different threads, but you can't be accessing the same one in more
than one thread at once.) I would love a threadsafe evhttp in 2.1 if
somebody wants to work on that.
No idea why this would happen more in 2.0.10-stable than in 2.0.8-rc;
There were some bugs fixed in 2.0.9-rc and 2.0.10-stable that might
make the main thread more aggressive about running events as needed,
or about scheduling events more quickly, thus making races more
frequent in practice, but I'm just guessing there.
--
Nick
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.