增加异步Responder有效性判断接口

This commit is contained in:
boyce
2020-11-26 12:10:11 +08:00
parent f94fbe4164
commit 5a21324f3b
2 changed files with 5 additions and 1 deletions

View File

@@ -25,6 +25,10 @@ type RpcResponse struct {
type Responder = RequestHandler
func (r *Responder) IsInvalid() bool {
return reflect.ValueOf(*r).Pointer() == reflect.ValueOf(reqHandlerNull).Pointer()
}
//var rpcResponsePool sync.Pool
var rpcRequestPool sync.Pool
var rpcCallPool sync.Pool