1
0
Fork 0
mirror of https://github.com/sourcegraph/jsonrpc2.git synced 2026-12-06 01:26:47 +01:00

docs/conn: clarify ordering guarantees for bidirectional calls (#105)

Users can otherwise mistake transport ordering for application-level synchronization and attempt blocking calls from the synchronous read loop.
This commit is contained in:
Keegan Carruthers-Smith 2026-09-10 09:43:30 +02:00 • committed by GitHub
parent fb2b860c84
commit bf8fe04036
Signed by: GitHub
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 6 deletions

View file

@ -3,7 +3,8 @@ package jsonrpc2
import "context"
// AsyncHandler wraps a Handler such that each request is handled in its own
// goroutine. It is a convenience wrapper.
// goroutine. Handlers may therefore start or finish in a different order than
// requests are received. It is a convenience wrapper.
func AsyncHandler(h Handler) Handler {
return asyncHandler{h}
}