qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 03/15] python/aqmp: Return cleared events from EventListener.


From: Hanna Reitz
Subject: Re: [PATCH 03/15] python/aqmp: Return cleared events from EventListener.clear()
Date: Mon, 4 Oct 2021 11:03:37 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 17.09.21 19:19, John Snow wrote:


On Fri, Sep 17, 2021 at 8:36 AM Hanna Reitz <hreitz@redhat.com <mailto:hreitz@redhat.com>> wrote:

    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 <jsnow@redhat.com
    <mailto:jsnow@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.


It isn't too late to change the name, but it sounds like you don't necessarily prefer any of those others over what's there now.

Oh, no, I was just thinking aloud.

Hanna




reply via email to

[Prev in Thread] Current Thread [Next in Thread]