Sign in
go
/
talks
/
dc5a11b2c169ac40c3401581e4161e2fc9efc40e
/
.
/
2012
/
chat
/
support
/
select.go
blob: db1ade8fb121a8cec13a7b851f13c2fe627297ce [
file
] [
log
] [
blame
]
// +build OMIT
package main
import (
"fmt"
"time"
)
func main() {
ticker := time.NewTicker(time.Millisecond * 250)
boom := time.After(time.Second * 1)
for {
select {
case <-ticker.C:
fmt.Println("tick")
case <-boom:
fmt.Println("boom!")
return
}
}
}