save an import

This commit is contained in:
Mark McGranaghan 2012-09-20 20:02:24 -07:00
parent 7011383887
commit 6f45d7d219

View File

@ -1,6 +1,6 @@
package main
import ("fmt"; "time")
import "time"
func main() {
jobs := make(chan int, 100)
@ -9,7 +9,7 @@ func main() {
for w := 0; w < 10; w++ {
go func() {
for j := range jobs {
fmt.Println("worker", w, "processing job", j)
println("worker", w, "processing job", j)
time.Sleep(time.Millisecond * 150)
acks <- true
}
@ -23,5 +23,5 @@ func main() {
for a := 0; a < 100; a++ {
<- acks
}
fmt.Println("all done")
println("all done")
}