# The first commit's message is:
Set daemon flag on async threads.
# The 2nd commit message will be skipped:
# Allow optionally setting thread's daemon but default to false.
# The 3rd commit message will be skipped:
# Revert "Allow optionally setting thread's daemon but default to false."
#
# This reverts commit
fd27bc29cf22c8050c9ef62d4bb69b2eb065de90.
self.running = True
if is_async:
self._thread = Thread(target=self._run)
+ self._thread.daemon = True
self._thread.start()
else:
self._run()