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

Function withGlobalEventCtx

tsunami/engine/globalctx.go:88–92  ·  view source on GitHub ↗
(ec *EventContextImpl, fn func() T)

Source from the content-addressed store, hash-verified

86}
87
88func withGlobalEventCtx[T any](ec *EventContextImpl, fn func() T) T {
89 setGlobalEventContext(ec)
90 defer clearGlobalEventContext()
91 return fn()
92}
93
94func GetGlobalEventContext() *EventContextImpl {
95 globalCtxMutex.Lock()

Callers 1

EventMethod · 0.85

Calls 2

setGlobalEventContextFunction · 0.85
clearGlobalEventContextFunction · 0.85

Tested by

no test coverage detected