You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by Nevo Hed <nh...@aereo.com> on 2014/01/29 17:36:57 UTC

setting libevent priority for client

Hi

I have a single threaded thrift C++ app that instantiates multiple
TNonblockingServer and attaches (registerEvents) them to a single
(libevent) event_base.

I don't currently have any facilities to support a multi-threaded solution
(locks etc), but have an immediate need to give clients of one of those
servers higher priority (lievent's event_priority_set).

I did not find any way to pass-along a libevent priority for clients of a
server.

The only option I can think of is to Add
TNonblockingServer::libeventPriority_
with get/set methods Pass said priority to TConnection, to be used in
TNonblockingServer::TConnection::setFlags right after event_set.

Thanks!
  --Nevo