~zyga/checkbox/buffered-signals

Viewing all changes in revision 3353.

  • Committer: Zygmunt Krynicki
  • Date: 2014-10-13 16:30:13 UTC
  • Revision ID: zygmunt.krynicki@canonical.com-20141013163013-bx64hk622vjla0a0
plainbox:signal: add Signal.buffered()

This patch adds a new context manager exposed as the Signal.buffered
method. While buffering is enabled all attempts to fire a specific
signal are inhibited and delayed after the context manager exits.

In addition, a squash mode is added where identical signals are combined
and sent only once. This mode changes the semantics of the code under
the context manager so it is not enabled by default.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: