[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[Libevent-users] On which thread does bufferevent filter run, and when?
- To: libevent-users <libevent-users@xxxxxxxxxxxxx>
- Subject: [Libevent-users] On which thread does bufferevent filter run, and when?
- From: Yucong Sun <sunyucong@xxxxxxxxx>
- Date: Sat, 25 Jan 2014 23:58:21 -0800
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: libevent-users-outgoing@xxxxxxxx
- Delivered-to: libevent-users@xxxxxxxx
- Delivery-date: Sun, 26 Jan 2014 02:58:55 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=FaxVf3xQXoAwpuzspkFgmfZnnPxKU5dfO3ZSwK7m/Hk=; b=YKe+Uy0ez4yggyxZ5VlwaHeYqIgR5l4oGDzmko4R7HftOzTTefSXKfAEa5Et38WVug h/WZWN/tPlKQNdpaRUtSpnlxSPS1bP7HmYcoqDnV2tkJrpcQ5BFbTU7Cq49oYGOTxWxy VoNubZhRMrBrAQTuIQgwtnfjmczKuvAGlu0WWBw184hguFpetVeCqgEBDF6hHqCJGnyl Q/ZicWQvQUflollBPSE+PVt93AblRhXfOSYuR3mY6scySqlcClxB62jFzmLOwxCURQhr br87DYtMvIPme9FYhUS4tge15hx8XvL6lpJ9IEtLnuI0/tN4wJCOuTlPjBLKWagRbqBu CIDw==
- Reply-to: libevent-users@xxxxxxxxxxxxx
- Sender: owner-libevent-users@xxxxxxxxxxxxx
Hi there,
So I need to implement a zlib bufferevent filter to transparent
compress the data passing through a bufferevent. and but I want the
zlib work to be done in a separate thread to offload main loop.
I currently call bufferevent_write() on main thread, would the filter
code executed immediately? if I call bufferevent_write() from
another thread, would the code be executed over that thread instead?
(locking is all properly setuped).
Also.. how does this play out with flush? is the filter code executed
only when calling flush?
Cheers.
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.