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

Method Await

util/safe_chan.go:69–77  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

67}
68
69func (p *Promise[S]) Await() (err error) {
70 <-p.Done()
71 err = context.Cause(p.Context)
72 if err == errResolved {
73 err = nil
74 }
75 p.CancelFunc()
76 return
77}
78
79func (p *Promise[S]) Then(resolved func(S), rejected func(error)) {
80 go func() {

Callers 5

ThenMethod · 0.95
receiveMethod · 0.80
AttachMethod · 0.80
AttachMethod · 0.80
AttachMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected