On 17.09.21 07:40, John Snow wrote:
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 <js...@redhat.com>
---
  python/qemu/aqmp/events.py | 9 +++++++--
  1 file changed, 7 insertions(+), 2 deletions(-)

Not sure if `clear` is an ideal name then, but `drain` sounds like something that would block, and `drop` is really much different from `clear`.  Also, doesn’t matter, having Collection.delete return the deleted element is a common thing in any language’s standard library, so why not have `clear` do the same.

Reviewed-by: Hanna Reitz <hre...@redhat.com>


Reply via email to