python/aqmp: Return cleared events from EventListener.clear()
authorJohn Snow <jsnow@redhat.com>
Thu, 23 Sep 2021 00:49:24 +0000 (20:49 -0400)
committerJohn Snow <jsnow@redhat.com>
Tue, 12 Oct 2021 16:22:10 +0000 (12:22 -0400)
commit6bfebc7306e42910cd33553d9ed385ef475d8196
tree814bf3d05b53fc1601d5aff291b4310db6893961
parent16cce725ed87e3ed5901c93e61514840c989216a
python/aqmp: Return cleared events from EventListener.clear()

This serves two purposes:

(1) It is now possible to discern whether or not clear() removed any
event(s) from the queue with absolute certainty, and

(2) It is now very easy to get a List of all pending events in one
chunk, which is useful for the sync bridge.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 20210923004938.3999963-4-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
python/qemu/aqmp/events.py