Skip to content

Commit 21cf769

Browse files
mgr/mgr_util: don't set event when it is already set
In class RTimer in mgr_util.py, "self.finished.set()" is run even though the event self.finished was set just now. If it wasn't set, the while loop the precedes it would've never finished running. Therefore, remove this redundant line of code. Signed-off-by: Rishabh Dave <[email protected]>
1 parent 327d209 commit 21cf769

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/pybind/mgr/mgr_util.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ def run(self):
8888
while not self.finished.is_set():
8989
self.finished.wait(self.interval)
9090
self.function(*self.args, **self.kwargs)
91-
self.finished.set()
9291
except Exception as e:
9392
logger.error("task exception: %s", e)
9493
raise

0 commit comments

Comments
 (0)