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

All Samples(2)  |  Call(0)  |  Derive(0)  |  Import(2)
Run given method synchronously in separate thread and return the result.

        def synchronous(func):
    '''Run given method synchronously in separate thread and return the result.'''
    def inner(*args, **kwargs):
        return threads.deferToThread(func, *args, **kwargs)
    return inner
        


src/s/t/stratum-0.2.15/stratum/example_service.py   stratum(Download)
import time
 
from services import GenericService, signature, synchronous
import pubsub
 

src/s/t/stratum-HEAD/stratum/example_service.py   stratum(Download)
import time
 
from services import GenericService, signature, synchronous
import pubsub