Async, signals that the current jsonrpc2 request may be handled asynchronously to subsequent requests, when ctx is the request context. Async must be called at most once on each request's context (and its descendants).
(ctx context.Context)
| 332 | // Async must be called at most once on each request's context (and its |
| 333 | // descendants). |
| 334 | func Async(ctx context.Context) { |
| 335 | if r, ok := ctx.Value(asyncKey).(*releaser); ok { |
| 336 | r.release(false) |
| 337 | } |
| 338 | } |
| 339 | |
| 340 | type asyncKeyType struct{} |
| 341 |