~zyga/checkbox/wip

Viewing all changes in revision 3349.

  • Committer: Zygmunt Krynicki
  • Date: 2014-10-09 08:35:09 UTC
  • Revision ID: zygmunt.krynicki@canonical.com-20141009083509-5za92bbks6zr7zsu
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: