From 9ef3be22e85f5ecfc2dee3ed938b1c62ba93a894 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Fri, 1 Jan 2021 18:07:41 +0100 Subject: [PATCH] Sleep during threads to avoid loops that run infinitely --- squinnondation/hazel.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/squinnondation/hazel.py b/squinnondation/hazel.py index 3d6575e..4039321 100644 --- a/squinnondation/hazel.py +++ b/squinnondation/hazel.py @@ -720,6 +720,9 @@ class HazelManager(Thread): self.squirrel.send_neighbours() self.last_neighbour = time.time() + # Avoid infinite loops + time.sleep(1) + class Inondator(Thread): """ @@ -740,6 +743,9 @@ class Inondator(Thread): # inundate self.squirrel.main_inundation() + # Avoid infinite loops + time.sleep(1) + class Message: """