mirror of
https://github.com/github/semantic.git
synced 2024-12-18 20:31:55 +03:00
24 lines
269 B
Go
24 lines
269 B
Go
package main
|
|
|
|
func main() {
|
|
select {
|
|
case a := <-c:
|
|
println(x)
|
|
case b <- c:
|
|
println(5)
|
|
case <-time.After(2):
|
|
println(6)
|
|
n++
|
|
if v {
|
|
waitDone <- result{n, v}
|
|
return
|
|
}
|
|
default:
|
|
return
|
|
}
|
|
select {
|
|
case <-channel:
|
|
case <-timeout:
|
|
}
|
|
}
|