目录重构完成,但是Preview通道尚未可用

This commit is contained in:
2026-08-07 19:42:49 +08:00
parent 3a381c85ed
commit 86df4bf3c5
16 changed files with 1620 additions and 24 deletions
+28
View File
@@ -0,0 +1,28 @@
//go:build !linux && !windows
package process
// Lock 获取进程间互斥锁 (非 Linux/Windows: 内存锁)
func (pm *ProcessManager) Lock() error {
pm.mu.Lock()
defer pm.mu.Unlock()
if pm.locked {
return nil
}
pm.locked = true
return nil
}
// Unlock 释放互斥锁 (非 Linux/Windows)
func (pm *ProcessManager) Unlock() error {
pm.mu.Lock()
defer pm.mu.Unlock()
if !pm.locked {
return nil
}
pm.locked = false
return nil
}