mirror of
https://gitee.com/johng/gf.git
synced 2024-12-05 13:48:09 +08:00
21 lines
407 B
Go
21 lines
407 B
Go
package main
|
|
|
|
import (
|
|
"gitee.com/johng/gf/g/os/gtime"
|
|
"fmt"
|
|
"gitee.com/johng/gf/g/container/glist"
|
|
"math"
|
|
)
|
|
|
|
func main() {
|
|
|
|
t1 := gtime.Microsecond()
|
|
c := make(chan struct{}, math.MaxInt64)
|
|
c <- struct{}{}
|
|
fmt.Println(gtime.Microsecond() - t1)
|
|
|
|
t2 := gtime.Microsecond()
|
|
l := glist.NewSafeList()
|
|
l.PushBack(func() {})
|
|
fmt.Println(gtime.Microsecond() - t2)
|
|
} |