Skip to content
  • Guido Trotter's avatar
    SingleActionPipeCondition =~ s/Action/Notify/ · 34cb5617
    Guido Trotter authored
    
    
    With this patch we simplify usage on the SingleActionCondition (which
    wasn't a condition at all) by making it a real condition. This way we
    can just wait() on it, or notifyAll() as we would on a normal one. The
    only catch is that notifyAll can be called only once, and wait can only
    be called before notifyAll has, but luckily our PipeCondition, now quite
    simplified, takes care of this, by providing a new SingleActionCondition
    each time the previous one has been notified.
    
    No Start/StopUsing function are needed anymore, and thus the condition
    is a lot more robust, and there's no way file descriptors can be left
    open, as they are closed in a finally block, in the same function where
    they were opened, by the last thread exiting the class.
    
    Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
    Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
    34cb5617