From b4ff4c7e75bb86f829efc7fe4198a59c7f2dfdc6 Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Tue, 17 Apr 2018 00:45:38 +0200 Subject: [PATCH] signal when read --- transport/pipe/impl.go | 1 + transport/pipe/pipe.go | 1 + 2 files changed, 2 insertions(+) diff --git a/transport/pipe/impl.go b/transport/pipe/impl.go index 6439e3efe..933f7208f 100644 --- a/transport/pipe/impl.go +++ b/transport/pipe/impl.go @@ -62,6 +62,7 @@ func (p *pipe) ReadMultiBuffer() (buf.MultiBuffer, error) { for { data, err := p.readMultiBufferInternal() if data != nil || err != nil { + p.writeSignal.Signal() return data, err } diff --git a/transport/pipe/pipe.go b/transport/pipe/pipe.go index a53e8b8d9..50c3c632d 100644 --- a/transport/pipe/pipe.go +++ b/transport/pipe/pipe.go @@ -19,6 +19,7 @@ func WithSizeLimit(limit int32) Option { } } +// New creates a new Reader and Writer that connects to each other. func New(opts ...Option) (*Reader, *Writer) { p := &pipe{ limit: defaultLimit,