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:
parent
fb2b860c84
commit
bf8fe04036
3 changed files with 11 additions and 6 deletions
3
async.go
3
async.go
|
|
@ -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}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue