管理端初步

This commit is contained in:
hoteas
2017-09-05 02:55:14 +00:00
parent 822d9708e4
commit 66c4b177c1
3 changed files with 103 additions and 142 deletions
+13 -6
View File
@@ -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")
}
}