Feature Request: Piped ev_async_send's should invoke multiple callbacks

Marc Lehmann schmorp at schmorp.de
Wed Oct 24 16:20:48 CEST 2012

On Tue, Oct 23, 2012 at 01:16:11PM +0530, "Chaliha, Sayan" <sayan.chaliha at in.verizonbusiness.com> wrote:
> be invoked only once by design. I would like for a separate callback to
> be invoked each time an ev_async_send is called on the watcher. If this
> is not a feature you would put in production, I would be very grateful
> if you could provide me with a patch.

Will not happen - here is a non-exhaustive list why:

- if all you need is the number of invocations, you can implement a counter
  using atomics. likewise if you need a queue of sorts. In many cases
  applications that do nontrivial things _already_ implement a counter or a
  queue for their own purposes, in which case libev's multiple invocations
  would be just unnecessary overhead that is not needed ever in practise,
  but punishes everybody because libev has to implement it's own counter
  or queue internally.

- it would be inconsistent w.r.t. any other watcher type, all of which
  combine multiple events into a single callback, which is generally
  the most efficient way to implement it.

                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      schmorp at schmorp.de
      -=====/_/_//_/\_,_/ /_/\_\

More information about the libev mailing list