21 Şub 2019 Per 17:12 tarihinde Burak Serdar <bser...@ieee.org> şunu yazdı:
> On Thu, Feb 21, 2019 at 6:51 AM Serhat Sevki Dincer <jfcga...@gmail.com> > wrote: > > > > But observer goroutines are not supposed to push to or pull from the > channel. > > What is a use case for observing a channel like this? If you call > waitempty(ch), when it returns ch may or may not be empty. Similar for > other functions. Looks like a good opportunity to create race > conditions. > By definition, waitempty(ch) returns "when" ch buffer is empty. Just after waitempty returns, ch buffer may or may not get new members. waitempty has guarantee that it will stay empty. > -- 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.