dispatch: channel reuse fix (#1237)

* Add test for dispatch channel reuse

* Dispatcher - make chans bidirectional

* No need to to keep the type assertion separate from the Get()

* Unexport Pipe's channel and add getter
This commit is contained in:
TaltaM
2023-06-21 04:33:40 +02:00
committed by GitHub
parent 97804a79da
commit db7441c723
6 changed files with 31 additions and 16 deletions

View File

@@ -213,7 +213,7 @@ func TestGetHoldings(t *testing.T) {
for i := 0; i < 2; i++ {
c := time.NewTimer(time.Second)
select {
case <-p.C:
case <-p.Channel():
case <-c.C:
}
}