管理端初步
This commit is contained in:
+13
-6
@@ -5,20 +5,27 @@ import (
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
"go.hoteas.com/hotime"
|
||||
"time"
|
||||
"fmt"
|
||||
//"fmt"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
a:=hotime.Map{}
|
||||
a.Get("y")
|
||||
for i:=0;i<300 ;i++ {
|
||||
a.Put("x",1)
|
||||
for i:=0;i<30 ;i++ {
|
||||
go func() {
|
||||
for j:=0;j<30 ;j++ {
|
||||
if j/2==0{
|
||||
a.Put("x","1")
|
||||
}else {
|
||||
fmt.Println(a.GetInt64("x"))
|
||||
hotime.SafeMutex("test", func() interface{} {
|
||||
|
||||
a.Put("x","1")
|
||||
|
||||
|
||||
return nil
|
||||
})
|
||||
}else {
|
||||
//fmt.Println(a.GetInt64("x"))
|
||||
a.Delete("x")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user