mirror of
https://github.com/YspCoder/clawgo.git
synced 2026-05-06 20:37:30 +08:00
Slim subagent runtime surface and remove legacy interfaces
This commit is contained in:
@@ -113,26 +113,6 @@ func (s *SessionScheduler) Acquire(ctx context.Context, sessionKey string, keys
|
||||
}
|
||||
}
|
||||
|
||||
func (s *SessionScheduler) Close() {
|
||||
if s == nil {
|
||||
return
|
||||
}
|
||||
s.mu.Lock()
|
||||
defer s.mu.Unlock()
|
||||
if s.closed {
|
||||
return
|
||||
}
|
||||
s.closed = true
|
||||
for _, st := range s.sessions {
|
||||
for _, w := range st.waiters {
|
||||
select {
|
||||
case w.ch <- struct{}{}:
|
||||
default:
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (s *SessionScheduler) releaseFunc(sessionKey string, runID uint64) func() {
|
||||
var once sync.Once
|
||||
return func() {
|
||||
|
||||
Reference in New Issue
Block a user