We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6dd1b40 commit 1bdae40Copy full SHA for 1bdae40
mercury/platform.py
@@ -558,6 +558,13 @@ def connect_to_cloud(self):
558
self._loop.run_in_executor(self._executor, self._cloud.start_connection)
559
560
def stop(self):
561
+ #
562
+ # to allow user application to invoke the "stop" method from a registered service,
563
+ # the system must start a new thread so that the service can finish first.
564
565
+ threading.Thread(target=self._bye).start()
566
+
567
+ def _bye(self):
568
if not self.stopped:
569
# guarantee this stop function to execute only once
570
self.stopped = True
0 commit comments