[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[Libevent-users] bufferevent_disable for event_cb?
- To: libevent-users@xxxxxxxx
- Subject: [Libevent-users] bufferevent_disable for event_cb?
- From: Jj Jack <jjjack94@xxxxxxxxx>
- Date: Mon, 22 Mar 2010 10:39:10 -0700 (PDT)
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: libevent-users-outgoing@xxxxxxxx
- Delivered-to: libevent-users@xxxxxxxx
- Delivery-date: Mon, 22 Mar 2010 13:39:19 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1269279550; bh=kaA88LFTh1RpT4HXa6NwOTfTqXQPfRevp8FbkR73KPE=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=GdOw8WV/8krMkXpYByF6erRKI0D2HIjrKQ9Nv/HXhFJrPxUiIElYrHJ16PR9jAxyiLT4JFQaGpnjav/5xjrVMOfPiNHE5fLW7stqJmAvVw/ZKBlj0slPmyWjkosGagKppM0m2X9K+T8ZYXggHrv9kDVhXuinIChqZG+jRswsCGs=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=C5JZvFRRqpduVP8UYxIPnz95kImoIPegU3D4KcEUVkvr17aCD2Te8NkYmPmDW4AH7v8/vLqp7G5PT4Q85hc5G35Ryooqe1+erAiGTs2H/dYNCyrEhtN/dpvADwA1i2kjegEyihisOm6LDfLMB+eFhgN2LLDfXxhyhFeE99HZtmw=;
- Reply-to: libevent-users@xxxxxxxxxxxxx
- Sender: owner-libevent-users@xxxxxxxxxxxxx
Hello,
I'm wondering why there isn't a bufferevent_disable for the event_cb? I think this'd be very useful in a multithreaded environment where you don't want the bufferevent freed before its been processed in some other thread.
i.e, think of this:
readcb gets a full request->disables reads/writes, queues bev in a worker queue->worker thread grabs bev, processes request, adds data to the write buffer, enables writes. (one request per connection model).
Exposing the reference counter so we can increment the bev's refcount manually would be a solution too.
Thanks!
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.