diff options
| author | Jeff Carr <[email protected]> | 2025-03-04 04:06:49 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-03-04 04:06:49 -0600 |
| commit | 5c033ce4316ec58177658abbef46ecdedbec8047 (patch) | |
| tree | ba7fad2ec57608c0b147114d548b9ffbe1b8c8ce | |
| parent | be696b98aa22f9cc449236cc6b001f53fde8afc0 (diff) | |
lock for gocuiv0.22.21
| -rw-r--r-- | init.go | 2 | ||||
| -rw-r--r-- | structs.go | 3 |
2 files changed, 5 insertions, 0 deletions
@@ -38,7 +38,9 @@ func (me *TreeInfo) catchActionChannel() { muAction.Lock() me.WaitOK() // time.Sleep(10 * time.Millisecond) + me.Lock() me.doAction(a) + me.Unlock() muAction.Unlock() } } @@ -7,6 +7,8 @@ package tree */ import ( + "sync" + "go.wit.com/lib/protobuf/guipb" "go.wit.com/widget" ) @@ -18,6 +20,7 @@ import ( var treeRoot *Node type TreeInfo struct { + sync.Mutex // a lock around the tree to serialize access ok bool // indicates the plugin actually initialized PluginName string // used to identify the plugin config *ToolkitConfigs // protobuf of plugin settings |
