Within websocket/stream.go, the async handshake is done in another go-routine (no async dial for TCP nor TLS yet, so we "fake" it). If successful, the caller's callback is invoked by Posting it from the handshake goroutine in sonic's goroutine (and hence the caller's goroutine).
Within that callback we might be compute bound for a long time or just start reading from the socket, where all reads are immediate up to a constant limit. While the callback is running, the Post lock might be held for long enough to noticeably starve other go-routines that are Posting.
Unsure yet how to bypass this.
Within
websocket/stream.go, the async handshake is done in another go-routine (no async dial for TCP nor TLS yet, so we "fake" it). If successful, the caller's callback is invoked byPosting it from the handshake goroutine in sonic's goroutine (and hence the caller's goroutine).Within that callback we might be compute bound for a long time or just start reading from the socket, where all reads are immediate up to a constant limit. While the callback is running, the
Postlock might be held for long enough to noticeably starve other go-routines that arePosting.Unsure yet how to bypass this.