MCPcopy Create free account
hub / github.com/Monibuca/engine / Accept

Method Accept

wait-tracks.go:41–57  ·  view source on GitHub ↗

Accept 检查名称是否在等待候选项中

(name string)

Source from the content-addressed store, hash-verified

39}
40// Accept 检查名称是否在等待候选项中
41func (w *waitTrackNames) Accept(name string) bool {
42 if !w.Waiting() {
43 return false
44 }
45 if w.Waitany() {
46 w.StopWait()
47 return true
48 } else {
49 for _, n := range *w {
50 if n == name {
51 w.StopWait()
52 return true
53 }
54 }
55 }
56 return false
57}
58
59type waitTracks struct {
60 *util.Promise[ISubscriber] // 等待中的Promise

Callers

nothing calls this directly

Calls 3

WaitingMethod · 0.95
WaitanyMethod · 0.95
StopWaitMethod · 0.95

Tested by

no test coverage detected