─░├žeri─če ge├ž

Referans i├žin hub_sdk/helpers/utils.py

Not

Bu dosya https://github.com/ultralytics/hub-sdk/blob/main/hub_sdk/helpers/utils .py adresinde mevcuttur. Bir sorun tespit ederseniz, l├╝tfen bir ├çekme ─░ste─či ­čŤá´ŞĆ ile katk─▒da bulunarak d├╝zeltmeye yard─▒mc─▒ olun. Te┼čekk├╝rler ­čÖĆ!



hub_sdk.helpers.utils.threaded(func)

Bir hedef i┼člevi ├žok i┼č par├žac─▒kl─▒ hale getirir ve i┼č par├žac─▒─č─▒ d├Ând├╝r├╝r.

Kullan─▒m: @threaded dekorat├Âr├╝.

Kaynak kodu hub_sdk/helpers/utils.py
def threaded(func):
    """
    Multi-threads a target function and returns thread.

    Usage: @threaded decorator.
    """

    def wrapper(*args, **kwargs):
        """Multi-threads a given function and returns the thread."""
        thread = threading.Thread(target=func, args=args, kwargs=kwargs, daemon=True)
        thread.start()
        return thread

    return wrapper