403Webshell
Server IP : 61.19.30.66  /  Your IP : 216.73.216.15
Web Server : Apache/2.2.22 (Ubuntu)
System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64
User : www-data ( 33)
PHP Version : 5.3.10-1ubuntu3.48
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : ON  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/lib/python2.7/dist-packages/twisted/internet/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.7/dist-packages/twisted/internet/threads.pyc
ó
[³XMc@sudZddlZddlmZddlmZd„Zd„Zd„Zd„Z	d	„Z
d
ddd
gZdS(s}
Extended thread dispatching support.

For basic support see reactor threading API docs.

Maintainer: Itamar Shtull-Trauring
iÿÿÿÿN(tfailure(tdefercs8tjƒ‰‡‡fd†}|j||||ŽˆS(s6
    Call the function C{f} using a thread from the given threadpool and return
    the result as a Deferred.

    This function is only used by client code which is maintaining its own
    threadpool.  To run a function in the reactor's threadpool, use
    C{deferToThread}.

    @param reactor: The reactor in whose main thread the Deferred will be
        invoked.

    @param threadpool: An object which supports the C{callInThreadWithCallback}
        method of C{twisted.python.threadpool.ThreadPool}.

    @param f: The function to call.
    @param *args: positional arguments to pass to f.
    @param **kwargs: keyword arguments to pass to f.

    @return: A Deferred which fires a callback with the result of f, or an
        errback with a L{twisted.python.failure.Failure} if f throws an
        exception.
    cs3|rˆjˆj|ƒnˆjˆj|ƒdS(N(tcallFromThreadtcallbackterrback(tsuccesstresult(tdtreactor(s</usr/lib/python2.7/dist-packages/twisted/internet/threads.pytonResult+s(RtDeferredtcallInThreadWithCallback(Rt
threadpooltftargstkwargsR	((RRs</usr/lib/python2.7/dist-packages/twisted/internet/threads.pytdeferToThreadPoolscOs,ddlm}t||jƒ|||ŽS(sw
    Run a function in a thread and return the result as a Deferred.

    @param f: The function to call.
    @param *args: positional arguments to pass to f.
    @param **kwargs: keyword arguments to pass to f.

    @return: A Deferred which fires a callback with the result of f,
    or an errback with a L{twisted.python.failure.Failure} if f throws
    an exception.
    iÿÿÿÿ(R(ttwisted.internetRRt
getThreadPool(R
RRR((s</usr/lib/python2.7/dist-packages/twisted/internet/threads.pyt
deferToThread6scCs+x$|D]\}}}|||ŽqWdS(s"
    Run a list of functions.
    N((t	tupleListR
RR((s</usr/lib/python2.7/dist-packages/twisted/internet/threads.pyt_runMultipleGscCs$ddlm}|jt|ƒdS(s
    Run a list of functions in the same thread.

    tupleList should be a list of (function, argsList, kwargsDict) tuples.
    iÿÿÿÿ(RN(RRtcallInThreadR(RR((s</usr/lib/python2.7/dist-packages/twisted/internet/threads.pytcallMultipleInThreadOscs`tjƒ‰‡‡‡‡fd†}|j|ƒˆjƒ}t|tjƒr\|jƒn|S(s‹
    Run a function in the reactor from a thread, and wait for the result
    synchronously.  If the function returns a L{Deferred}, wait for its
    result and return that.

    @param reactor: The L{IReactorThreads} provider which will be used to
        schedule the function call.
    @param f: the callable to run in the reactor thread
    @type f: any callable.
    @param a: the arguments to pass to C{f}.
    @param kw: the keyword arguments to pass to C{f}.

    @return: the result of the L{Deferred} returned by C{f}, or the result
        of C{f} if it returns anything other than a L{Deferred}.

    @raise: If C{f} raises a synchronous exception,
        C{blockingCallFromThread} will raise that exception.  If C{f}
        returns a L{Deferred} which fires with a L{Failure},
        C{blockingCallFromThread} will raise that failure's exception (see
        L{Failure.raiseException}).
    cs)tjˆˆˆŽ}|jˆjƒdS(N(Rt
maybeDeferredtaddBothtput(R(taR
tqueuetkw(s</usr/lib/python2.7/dist-packages/twisted/internet/threads.pyt_callFromThreadps(tQueueRtgett
isinstanceRtFailuretraiseException(RR
RRRR((RR
RRs</usr/lib/python2.7/dist-packages/twisted/internet/threads.pytblockingCallFromThreadYs

RRRR$(t__doc__Rttwisted.pythonRRRRRRRR$t__all__(((s</usr/lib/python2.7/dist-packages/twisted/internet/threads.pyt<module>
s	$			
	!	

Youez - 2016 - github.com/yon3zu
LinuXploit