Request 发送请求并等待响应(同步调用)
(msg Message, timeout time.Duration)
| 48 | |
| 49 | // Request 发送请求并等待响应(同步调用) |
| 50 | func (p *PID) Request(msg Message, timeout time.Duration) (Message, error) { |
| 51 | if p.system == nil { |
| 52 | return nil, errors.New("actor system not available") |
| 53 | } |
| 54 | return p.system.Request(p, msg, timeout) |
| 55 | } |
| 56 | |
| 57 | // Actor |
| 58 | // 实现此接口即可成为 Actor |
no outgoing calls