zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Dunning <ted.dunn...@gmail.com>
Subject Re: thread pool executor for event dispatch
Date Mon, 15 Aug 2011 22:35:26 GMT
This sounds like a very reasonable idea except that the client contract
currently guarantees serialized execution of watcher callbacks.  This can be
very hard to do without.

Having this be configurable with a strong default for the current behavior
might be nice, though.

Do you have a suggested patch?

On Mon, Aug 15, 2011 at 2:15 PM, Martin Serrano <martin@attivio.com> wrote:

> Hi,
>
> Has the zookeeper community considered adding an option to use a thread
> pool executor for event dispatch?  One pattern we have developed for our
> library is to trigger event listeners in a separate thread to guard against
> blocking operations in listeners.  A blocking watcher will prevent new
> events/watchers from being triggered.  By adding the ability to configure
> which Executor was used by a zookeeper client for event delivery library
> writers could make the choice that is best for them.  Being able to do this
> at the client level (rather than for each individual watcher class I
> implement) is a cleaner approach IMO.
>
> Thoughts?
>
> -Martin
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message