We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fcc35ac commit b597a93Copy full SHA for b597a93
slips_files/core/profiler.py
@@ -664,12 +664,14 @@ def should_stop(self):
664
return False
665
666
def shutdown_gracefully(self):
667
- # signal the threads to stop
668
self.stop_profiler_threads.set()
+ # wait for all flows to be processed by the profiler threads.
669
+ self.join_profiler_threads()
670
+ # close the queues to avoid deadlocks.
671
+ # this step SHOULD NEVER be done before closing the threads
672
self.flows_to_process_q.close()
673
self.profiler_queue.close()
- # wait for them to finish
- self.join_profiler_threads()
674
+
675
self.db.set_new_incoming_flows(False)
676
self.print(
677
f"Stopping. Total lines read: {self.rec_lines}",
0 commit comments