Ultralytics Code Refactor https://ultralytics.com/actions (#13152)
Refactor code for speed and clarity
This commit is contained in:
1 parent
05e59bdec1
commit
b9019671f4
13 files changed
+29
-5
No files matched your search
@@ -34,6 +34,7 @@ def threaded(func):
|
||||
"""Decorator @threaded to run a function in a separate thread, returning the thread instance."""
|
||||
|
||||
def wrapper(*args, **kwargs):
|
||||
"""Runs the decorated function in a separate daemon thread and returns the thread instance."""
|
||||
thread = threading.Thread(target=func, args=args, kwargs=kwargs, daemon=True)
|
||||
thread.start()
|
||||
return thread
|
||||
|
||||
Reference in new issue
Block a user