3 // Copyright 2009 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
14 func GetValue() uint {
19 func Send(a, b chan uint) int {
40 a := make(chan uint, 1)
41 b := make(chan uint, 1)
42 if v := Send(a, b); v != 2 {
43 println("Send returned", v, "!= 2")
46 if av, bv := <-a, <-b; av|bv != 3 {
47 println("bad values", av, bv)
50 if v := Send(a, nil); v != 1 {
51 println("Send returned", v, "!= 1")
55 println("counter is", counter, "!= 10")