mirror of
https://github.com/github/semantic.git
synced 2024-12-01 17:59:10 +03:00
25 lines
273 B
Go
25 lines
273 B
Go
package main
|
|
|
|
func main() {
|
|
select {
|
|
case x := <-c:
|
|
println(x)
|
|
case y <- c:
|
|
println(5)
|
|
case <-time.After(1):
|
|
println(6)
|
|
n--
|
|
if x {
|
|
waitDone <- result{n, x}
|
|
return
|
|
}
|
|
default:
|
|
return
|
|
}
|
|
select {
|
|
case <-ch:
|
|
case <-timeout:
|
|
default:
|
|
}
|
|
}
|