mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2025-01-07 02:10:26 +00:00
Fix a bug related to hypha creation
This commit is contained in:
parent
140d97ddf4
commit
016aa83016
@ -45,6 +45,10 @@ func storeHypha(h *Hypha) {
|
|||||||
byNamesMutex.Lock()
|
byNamesMutex.Lock()
|
||||||
byNames[h.Name] = h
|
byNames[h.Name] = h
|
||||||
byNamesMutex.Unlock()
|
byNamesMutex.Unlock()
|
||||||
|
|
||||||
|
h.Lock()
|
||||||
|
h.Exists = true
|
||||||
|
h.Unlock()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Insert inserts the hypha into the storage. A previous record is used if possible. Count incrementation is done if needed.
|
// Insert inserts the hypha into the storage. A previous record is used if possible. Count incrementation is done if needed.
|
||||||
@ -101,6 +105,5 @@ func (h *Hypha) MergeIn(oh *Hypha) {
|
|||||||
}
|
}
|
||||||
h.BinaryPath = oh.BinaryPath
|
h.BinaryPath = oh.BinaryPath
|
||||||
}
|
}
|
||||||
h.Exists = oh.Exists
|
|
||||||
h.Unlock()
|
h.Unlock()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user