libevent icon indicating copy to clipboard operation
libevent copied to clipboard

bufferevent_priority_set doesn't work so well

Open nmathewson opened this issue 11 years ago • 2 comments

If bufferevent_priority_set() is to work, it needs to change the priority assigned to every future event and callback. But events and callbacks can be initialized after bufferevent_priority_set() is called -- for example, in be_socket_setfd.

Further, it should really affect the priority of events used to implement rate-limiting.

nmathewson avatar Apr 27 '13 01:04 nmathewson

@libevent/maintainers 2.2 instead of 2.1?

azat avatar May 09 '16 22:05 azat

Hm, but event_priority_set() set the ev_pri field and nobody reset it after, i.e. event_del()/event_assign() (from be_socket_setfd()) does not reset them, so @nmathewson everything works or I missing something?

As for ratelimit, will be enough to add event_priority_set(refill_bucket_event/master_refill_event, bufferevent_priority_get(bev)) ?

azat avatar Oct 28 '18 14:10 azat