MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / goFuncWithTimeout

Method goFuncWithTimeout

blockproducer/chain.go:1048–1058  ·  view source on GitHub ↗
(f func(ctx context.Context), timeout time.Duration)

Source from the content-addressed store, hash-verified

1046}
1047
1048func (c *Chain) goFuncWithTimeout(f func(ctx context.Context), timeout time.Duration) {
1049 c.wg.Add(1)
1050 go func() {
1051 var ctx, ccl = context.WithTimeout(c.ctx, timeout)
1052 defer func() {
1053 c.wg.Done()
1054 ccl()
1055 }()
1056 f(ctx)
1057 }()
1058}

Callers 2

Calls 1

AddMethod · 0.45

Tested by

no test coverage detected