Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
tvault-contego / usr / lib / python2.7 / dist-packages / contego / async_utils.pyc
Size: Mime:
ó
•gª`c@sRddlmZmZmZddlmZddlmZd„Zd„Z	dS(iÿÿÿÿ(tThreadtEventtBoundedSemaphore(twraps(tRetryExceptioncstˆƒ‡fd†ƒ}|S(sÛ
        run_async(func)
            function decorator, intended to make "func" run in a separate
            thread (asynchronously).
            Returns the created Thread object

            E.g.:
            @run_async
            def task1():
                do_something

            @run_async
            def task2():
                do_something_too

            t1 = task1()
            t2 = task2()
            ...
            t1.join()
            t2.join()
    cs)tdˆd|d|ƒ}|jƒ|S(Nttargettargstkwargs(Rtstart(RRtfunc_hl(tfunc(s7/usr/lib/python2.7/dist-packages/contego/async_utils.pyt
async_func s
(R(R
R((R
s7/usr/lib/python2.7/dist-packages/contego/async_utils.pyt	run_async	scs‡fd†}|S(Ncs"tˆƒ‡‡fd†ƒ}|S(Ncs¶tƒ}‡fd†}ˆjtƒr¦yR|ji|d6ˆd6ƒtd|d|d|ƒ}|jƒ|jƒ|SWq²tk
r¢ˆjƒt	dƒ‚q²Xnt	dƒ‚dS(NcsK|jdƒ}|jdƒ}|jƒz|||ŽWdˆjƒXdS(Ntthread_start_eventtactual_func(tpoptsettrelease(RRttheventtthfunc(t
throttling(s7/usr/lib/python2.7/dist-packages/contego/async_utils.pytthread_wrapper_func/s
R
RRRRs	Retry....(
RtacquiretFalsetupdateRRtwaitt
BaseExceptionRR(RRteventRR	(R
R(s7/usr/lib/python2.7/dist-packages/contego/async_utils.pyR+s		



(R(R
R(R(R
s7/usr/lib/python2.7/dist-packages/contego/async_utils.pyR*s((RR((Rs7/usr/lib/python2.7/dist-packages/contego/async_utils.pytrun_async_by_throttle)sN(
t	threadingRRRt	functoolsRtcontego.exceptionRRR(((s7/usr/lib/python2.7/dist-packages/contego/async_utils.pyt<module>s