menus and windows

This commit is contained in:
sawka
2024-05-16 14:00:39 -07:00
parent b721f59166
commit cc4629f9e0
2 changed files with 47 additions and 11 deletions
+7
View File
@@ -115,6 +115,7 @@ func CloseBlock(blockId string) {
}
bc.Close()
close(bc.InputCh)
removeBlockData(blockId)
}
func GetBlockData(blockId string) *BlockData {
@@ -129,6 +130,12 @@ func setBlockData(bd *BlockData) {
blockDataMap[bd.BlockId] = bd
}
func removeBlockData(blockId string) {
globalLock.Lock()
defer globalLock.Unlock()
delete(blockDataMap, blockId)
}
func (bc *BlockController) setShellProc(shellProc *shellexec.ShellProc) error {
bc.Lock.Lock()
defer bc.Lock.Unlock()