Commit 755e3654 authored by Kirill Smelkov's avatar Kirill Smelkov

X Request.Reply: switch to replying directly over link

- BenchmarkLinkNetPipeRTT-4         300000              5668 ns/op             225 B/op          5 allocs/op
+ BenchmarkLinkNetPipeRTT-4         300000              4825 ns/op             225 B/op          5 allocs/op
parent c643ba53
......@@ -1476,16 +1476,16 @@ func (link *NodeLink) Recv1() (Request, error) {
//
// XXX doc
func (req *Request) Reply(resp Msg) error {
return req.conn.Send(resp)
return req.conn.sendMsgDirect(resp)
//err1 := req.conn.Send(resp)
//err2 := req.conn.Close() // XXX no - only Send here?
//return xerr.First(err1, err2)
}
// Release must be called to free request resources.
// Close must be called to free request resources.
//
// XXX doc
func (req *Request) Release() {
func (req *Request) Close() { // XXX +error?
//return req.conn.Close()
// XXX req.Msg.Release() ?
req.Msg = nil
......
......@@ -1035,7 +1035,7 @@ func benchmarkLinkRTT(b *testing.B, l1, l2 *NodeLink) {
}
}
req.Release()
req.Close()
}
}()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment