mirror of https://github.com/panjf2000/ants.git
Merge branch 'develop'
This commit is contained in:
commit
def9a9d916
|
@ -56,13 +56,11 @@ func myFunc(i interface{}) {
|
||||||
n := i.(int32)
|
n := i.(int32)
|
||||||
atomic.AddInt32(&sum, n)
|
atomic.AddInt32(&sum, n)
|
||||||
fmt.Printf("run with %d\n", n)
|
fmt.Printf("run with %d\n", n)
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func demoFunc() {
|
func demoFunc() {
|
||||||
time.Sleep(10 * time.Millisecond)
|
time.Sleep(10 * time.Millisecond)
|
||||||
fmt.Println("Hello World!")
|
fmt.Println("Hello World!")
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
|
@ -55,13 +55,11 @@ func myFunc(i interface{}) {
|
||||||
n := i.(int32)
|
n := i.(int32)
|
||||||
atomic.AddInt32(&sum, n)
|
atomic.AddInt32(&sum, n)
|
||||||
fmt.Printf("run with %d\n", n)
|
fmt.Printf("run with %d\n", n)
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func demoFunc() {
|
func demoFunc() {
|
||||||
time.Sleep(10 * time.Millisecond)
|
time.Sleep(10 * time.Millisecond)
|
||||||
fmt.Println("Hello World!")
|
fmt.Println("Hello World!")
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
|
@ -37,13 +37,11 @@ func myFunc(i interface{}) {
|
||||||
n := i.(int32)
|
n := i.(int32)
|
||||||
atomic.AddInt32(&sum, n)
|
atomic.AddInt32(&sum, n)
|
||||||
fmt.Printf("run with %d\n", n)
|
fmt.Printf("run with %d\n", n)
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func demoFunc() {
|
func demoFunc() {
|
||||||
time.Sleep(10 * time.Millisecond)
|
time.Sleep(10 * time.Millisecond)
|
||||||
fmt.Println("Hello World!")
|
fmt.Println("Hello World!")
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
Loading…
Reference in New Issue