From 855fde241cf5f60ff2dfd51f213307d7ae2403b3 Mon Sep 17 00:00:00 2001 From: Mark McGranaghan Date: Wed, 17 Oct 2012 18:31:47 -0700 Subject: [PATCH] meh not useful --- examples.txt | 1 - .../concurrent-goroutines.go | 25 ------------------- 2 files changed, 26 deletions(-) delete mode 100644 examples/concurrent-goroutines/concurrent-goroutines.go diff --git a/examples.txt b/examples.txt index f84e2c2..cd1ad64 100644 --- a/examples.txt +++ b/examples.txt @@ -25,7 +25,6 @@ Recursion # Errors # OK Guards Goroutines -# Concurrent Goroutines Channels # Channel Buffering # Channel Directions diff --git a/examples/concurrent-goroutines/concurrent-goroutines.go b/examples/concurrent-goroutines/concurrent-goroutines.go deleted file mode 100644 index 493d7ba..0000000 --- a/examples/concurrent-goroutines/concurrent-goroutines.go +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import "time" -import "math/rand" -import "fmt" - -func f(n int) { - for i := 0; i < 10; i++ { - fmt.Println(n, ":", i) - breakTime := time.Duration(rand.Intn(150)) - time.Sleep(time.Millisecond * breakTime) - } -} - -func main() { - for i := 0; i < 5; i++ { - f(i) - } - fmt.Println() - for i := 0; i < 5; i++ { - go f(i) - } - var input string - fmt.Scanln(&input) -}