| // Copyright 2009 The Go Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| // Pass numbers along a chain of threads. |
| func link(left chan<- int, right <-chan int) { |
| // Keep the links in dedicated operating system |
| // threads, so that this program tests coordination |
| // between pthreads and not just goroutines. |
| stdio.Stdout.WriteString(strconv.Itoa(v) + "\n") |
| leftmost := make(chan int) |
| left, right = right, make(chan int) |
| stdio.Stdout.WriteString(strconv.Itoa(x) + "\n") |