Changed QueueTimeout to not require WaitMap

gql_cataclysm
noah metz 2023-11-03 21:53:49 -06:00
parent f5a08bbc48
commit 3052f8099f
1 changed files with 3 additions and 3 deletions

@ -167,12 +167,12 @@ func (node *Node) ProcessResponse(wait_map WaitMap, response ResponseSignal) (Wa
return WaitInfo{}, false return WaitInfo{}, false
} }
// Creates a timeout signal for signal, queues it for the node at the timeout, and adds the info to the wait map // Creates a timeout signal for signal, queues it for the node at the timeout, and returns the WaitInfo
func (node *Node) QueueTimeout(dest NodeID, signal Signal, timeout time.Duration, wait_map WaitMap) { func (node *Node) QueueTimeout(dest NodeID, signal Signal, timeout time.Duration) WaitInfo {
timeout_signal := NewTimeoutSignal(signal.ID()) timeout_signal := NewTimeoutSignal(signal.ID())
node.QueueSignal(time.Now().Add(timeout), timeout_signal) node.QueueSignal(time.Now().Add(timeout), timeout_signal)
wait_map[signal.ID()] = WaitInfo{ return WaitInfo{
NodeID: dest, NodeID: dest,
Timeout: timeout_signal.Id, Timeout: timeout_signal.Id,
} }