Best microservices framework in Go, like alibaba Dubbo, but with more features, Scale easily. Try it. Test it. If you feel it's better, use it! 𝐉𝐚𝐯𝐚有𝐝𝐮𝐛𝐛𝐨, 𝐆𝐨𝐥𝐚𝐧𝐠有𝐫𝐩𝐜𝐱! build for cloud!
call, err := xclient.Go(context.Background(), "Mul", args, reply, nil)
if err != nil {
log.Fatalf("failed to call: %v", err)
}
replyCall := <-call.Done // <- block here
查看源碼後發現在 Client.Go 函數中相關的代碼被註解掉了
// // we allow done is nil
// if done == nil {
// done = make(chan *Call, 10) // buffered.
// } else {
// // If caller passes done != nil, it must arrange that
// // done has enough buffer for the number of simultaneous
// // RPCs that will be using that channel. If the channel
// // is totally unbuffered, it's best not to run at all.
// if cap(done) == 0 {
// log.Panic("rpc: done channel is unbuffered")
// }
// }
官方文檔中的「异步调用 Service 」範例會阻塞
查看源碼後發現在 Client.Go 函數中相關的代碼被註解掉了
請問是預期行為嗎?謝謝~