try the lock but don't insist on it

This commit is contained in:
Jeff Carr 2025-03-04 21:05:25 -06:00
parent 860908c82f
commit 975c2d3102
1 changed files with 5 additions and 2 deletions

View File

@ -6,8 +6,11 @@ import (
)
func (me *TreeInfo) AddNode(a *widget.Action) *Node {
// me.Lock()
// defer me.Unlock()
if me.TryLock() {
defer me.Unlock()
} else {
log.Info("TREE: mutex lock was already held before AddNode()")
}
return AddNode(a)
}