OSDN Git Service

add
authorHAOYUatHZ <haoyu@protonmail.com>
Tue, 27 Aug 2019 07:25:34 +0000 (15:25 +0800)
committerHAOYUatHZ <haoyu@protonmail.com>
Tue, 27 Aug 2019 07:25:34 +0000 (15:25 +0800)
toolbar/precog/monitor/monitor.go

index 3215aec..90dfa93 100644 (file)
@@ -6,7 +6,7 @@ import (
        "os"
        "os/user"
        "strings"
-       // "sync"
+       "sync"
        // "time"
 
        "github.com/jinzhu/gorm"
@@ -29,7 +29,7 @@ import (
 )
 
 type monitor struct {
-       // *sync.RWMutex
+       *sync.RWMutex
        cfg           *config.Config
        db            *gorm.DB
        nodeCfg       *vaporCfg.Config
@@ -71,7 +71,7 @@ func NewMonitor(cfg *config.Config, db *gorm.DB) *monitor {
        }
 
        return &monitor{
-               // RWMutex:       &sync.RWMutex{},
+               RWMutex:       &sync.RWMutex{},
                cfg:           cfg,
                db:            db,
                nodeCfg:       nodeCfg,