(f func(ctx context.Context), timeout time.Duration)
| 1046 | } |
| 1047 | |
| 1048 | func (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 | } |
no test coverage detected