MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / withGlobalEffectCtx

Function withGlobalEffectCtx

tsunami/engine/globalctx.go:118–122  ·  view source on GitHub ↗
(ec *EffectContextImpl, fn func() T)

Source from the content-addressed store, hash-verified

116}
117
118func withGlobalEffectCtx[T any](ec *EffectContextImpl, fn func() T) T {
119 setGlobalEffectContext(ec)
120 defer clearGlobalEffectContext()
121 return fn()
122}
123
124func GetGlobalEffectContext() *EffectContextImpl {
125 globalCtxMutex.Lock()

Callers 2

runEffectUnmountMethod · 0.85
runEffectMethod · 0.85

Calls 2

setGlobalEffectContextFunction · 0.85
clearGlobalEffectContextFunction · 0.85

Tested by

no test coverage detected