diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2022-06-21 19:41:44 +0200 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2022-06-21 19:41:44 +0200 |
| commit | a2cd1b1fdca76c1a20f95457cc0722a61a42aa5b (patch) | |
| tree | a03e06add3d131b710b5d9a3162c9ceca0815233 | |
| parent | dc7f062517b109046ab45dc76c8d59c247bdc53f (diff) | |
Debug node state update that should be performed before node queue update
| -rw-r--r-- | esds/esds.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/esds/esds.py b/esds/esds.py index 148c205..07b57c7 100644 --- a/esds/esds.py +++ b/esds/esds.py @@ -446,8 +446,8 @@ class Simulator: interface=node.rargs if node["interfaces_queue_size"][interface] > 0: node["interfaces_queue_size"][interface]-=1 - node.rqueue.put(("receive",0)) node["state"]="running" + node.rqueue.put(("receive",0)) # Do not forget to collect the next event. This is the only request which is processed here self.sync_node(node) self.sync_event(node) @@ -533,8 +533,8 @@ class Simulator: # Notify nodes that wait for the end of the simulation # Note that we do not allow them to create new events (even if they try, they will not be processed) for node_id in self.wait_end_nodes: - self.nodes[node_id].rqueue.put(("sim_end",0)) self.nodes[node_id]["state"]="running" + self.nodes[node_id].rqueue.put(("sim_end",0)) self.sync_node(self.nodes[node_id]) # Allow them for make call requests (printing logs for example) break # End the event processing loop @@ -560,8 +560,8 @@ class Simulator: # If node is receiving makes it consume (this way if there is a timeout, it will be removed!) if dst["state"] == "request" and dst["request"] == "receive": dst["interfaces_queue_size"][interface]-=1 - dst.rqueue.put(("receive",0)) dst["state"]="running" + dst.rqueue.put(("receive",0)) self.sync_node(dst) src["state"]="running" src.rqueue.put(("send",0)) @@ -573,8 +573,8 @@ class Simulator: # If node is receiving makes it consume (this way if there is a timeout, it will be removed!) if dst["state"] == "request" and dst["request"] == "receive": dst["interfaces_queue_size"][interface]-=1 - dst.rqueue.put(("receive",0)) dst["state"]="running" + dst.rqueue.put(("receive",0)) self.sync_node(dst) else: src["state"]="running" |
