But observer goroutines are not supposed to push to or pull from the channel.
21 Şub 2019 Per 16:46 tarihinde Jan Mercl <0xj...@gmail.com> şunu yazdı: > On Thu, Feb 21, 2019 at 2:38 PM Serhat Şevki Dinçer <jfcga...@gmail.com> > wrote: > > > waitempty(ch) > > blocks caller until ch buffer is empty > > Not exactly the same, but a similar mechanism exists: > > select { > case x := <-ch: > ... > default: > ... ch is empty > } > > > waitfull(ch) > > blocks caller until ch buffer is full > > Dtto > > select { > case ch <- x: > ... > default: > ... ch is full > } > > > > What do you think? > > That the above is enough of gears to implement what you're after. > > -- > > -j > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.