Skip to content

Commit

Permalink
board-conf-tools: Avoid Thread.setDaemon
Browse files Browse the repository at this point in the history
Deprecated since Python 3.10, and we are on 3.11.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
  • Loading branch information
jan-kiszka authored and huaqianli committed Aug 20, 2024
1 parent 63dba60 commit 168b771
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@

def threadDecorator(func):
def wrapper(*args, **kwargs):
thread = threading.Thread(target=func, args=args, kwargs=kwargs)
thread.setDaemon(True)
thread = threading.Thread(target=func, args=args, kwargs=kwargs, daemon=True)
thread.start()
thread.join(3)
if thread.is_alive():
Expand Down

0 comments on commit 168b771

Please sign in to comment.