SingleActionPipeCondition =~ s/Action/Notify/
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:Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
Loading
Please register or sign in to comment