Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(0)  |  Derive(0)  |  Import(4)
Decorator for executing a function in a separate :class:`threading.Thread`.

        def async(func):
    """
    Decorator for executing a function in a separate :class:`threading.Thread`.
    """
    @wraps(func)
    def wrapper(*args, **kwargs):
        thread = Thread(target=func, args=args, kwargs=kwargs)
        thread.daemon = True
        return thread.start()
    return wrapper
        


src/t/u/turses-0.2.22/turses/core.py   turses(Download)
 
from turses.utils import get_urls
from turses.meta import async, wrap_exceptions, Observer
from turses.config import configuration
from turses.utils import is_username

src/t/u/turses-HEAD/turses/core.py   turses(Download)
 
from turses.utils import get_urls
from turses.meta import async, wrap_exceptions, Observer
from turses.config import configuration
from turses.utils import is_username

src/t/u/turses-0.2.22/turses/api/base.py   turses(Download)
from turses.models import is_DM
from turses.utils import encode
from turses.meta import async, wrap_exceptions
 
 

src/t/u/turses-HEAD/turses/api/base.py   turses(Download)
from turses.models import is_DM
from turses.utils import encode
from turses.meta import async, wrap_exceptions