Skip to content

Commit

Permalink
optimize example code
Browse files Browse the repository at this point in the history
  • Loading branch information
panjf2000 committed Dec 3, 2018
1 parent 869bcf8 commit b0a859a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ import (

var sum int32

func myFunc(i interface{}) error {
func myFunc(i interface{}) {
n := i.(int32)
atomic.AddInt32(&sum, n)
fmt.Printf("run with %d\n", n)
return nil
}

func demoFunc() error {
func demoFunc() {
time.Sleep(10 * time.Millisecond)
fmt.Println("Hello World!")
return nil
Expand Down

0 comments on commit b0a859a

Please sign in to comment.