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

[Libevent-users] On which thread does bufferevent filter run, and when?



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.