tzh
2024-08-22 c7d0944258c7d0943aa7b2211498fd612971ce27
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
L\¬Qc@s¥dZdddddddgZdd    lZdefd
„ƒYZid „Zd „Zd „Zd„Z    d    d„Z de fd„ƒYZ eaead„Zd    S(s,Drop-in replacement for the thread module.
 
Meant to be used as a brain-dead substitute so that threaded code does
not need to be rewritten for when the thread module is not present.
 
Suggested usage is::
 
    try:
        import thread
    except ImportError:
        import dummy_thread as thread
 
terrortstart_new_threadtexitt    get_identt allocate_locktinterrupt_maintLockTypeiÿÿÿÿNcBseZdZd„ZRS(s%Dummy implementation of thread.error.cGs ||_dS(N(targs(tselfR((sT/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/dummy_thread.pyt__init__s(t__name__t
__module__t__doc__R    (((sT/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/dummy_thread.pyRscCs®t|ƒttƒƒkr*tdƒ‚nt|ƒttƒƒkrTtdƒ‚ntay|||ŽWn!tk
r~ntjƒnXt    at
rªta
t ‚ndS(säDummy implementation of thread.start_new_thread().
 
    Compatibility is maintained by making sure that ``args`` is a
    tuple and ``kwargs`` is a dictionary.  If an exception is raised
    and it is SystemExit (which can be done by thread.exit()) it is
    caught and nothing is done; all other exceptions are printed out
    by using traceback.print_exc().
 
    If the executed function calls interrupt_main the KeyboardInterrupt will be
    raised when the function returns.
 
    s2nd arg must be a tuples3rd arg must be a dictN( ttypettuplet    TypeErrortdicttFalset_maint
SystemExitt
_tracebackt    print_exctTruet
_interrupttKeyboardInterrupt(tfunctionRtkwargs((sT/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/dummy_thread.pyRs  cCs
t‚dS(s&Dummy implementation of thread.exit().N(R(((sT/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/dummy_thread.pyR:scCsdS(sòDummy implementation of thread.get_ident().
 
    Since this module should only be used when threadmodule is not
    available, it is safe to assume that the current process is the
    only thread.  Thus a constant can be safely returned.
    iÿÿÿÿ((((sT/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/dummy_thread.pyR>scCstƒS(s/Dummy implementation of thread.allocate_lock().(R(((sT/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/dummy_thread.pyRGscCs|dk    rtdƒ‚ndS(s,Dummy implementation of thread.stack_size().s'setting thread stack size not supportediN(tNoneR(tsize((sT/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/dummy_thread.pyt
stack_sizeKs cBsDeZdZd„Zdd„ZeZd„Zd„Zd„Z    RS(s‹Class implementing dummy implementation of thread.LockType.
 
    Compatibility is maintained by maintaining self.locked_status
    which is a boolean that stores the state of the lock.  Pickling of
    the lock, though, should not be done since if the thread module is
    then used with an unpickled ``lock()`` from here problems could
    occur from this class not having atomic methods.
 
    cCs t|_dS(N(Rt locked_status(R((sT/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/dummy_thread.pyR    \scCs=|dks|rt|_tS|js5t|_tStSdS(s©Dummy implementation of acquire().
 
        For blocking calls, self.locked_status is automatically set to
        True and returned appropriately based on value of
        ``waitflag``.  If it is non-blocking, then the value is
        actually checked and not set if it is already acquired.  This
        is all done so that threading.Condition's assert statements
        aren't triggered and throw a little fit.
 
        N(RRRR(Rtwaitflag((sT/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/dummy_thread.pytacquire_s             cCs|jƒdS(N(trelease(Rttyptvalttb((sT/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/dummy_thread.pyt__exit__vscCs|jst‚nt|_tS(sRelease the dummy lock.(RRRR(R((sT/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/dummy_thread.pyR!ys            cCs|jS(N(R(R((sT/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/dummy_thread.pytlocked‚sN(
R
R R R    RR t    __enter__R%R!R&(((sT/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/dummy_thread.pyRQs                     cCstrt‚ntadS(s^Set _interrupt flag to True to have start_new_thread raise
    KeyboardInterrupt upon exiting.N(RRRR(((sT/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/dummy_thread.pyRŠs    (R t__all__t    tracebackRt    ExceptionRRRRRRRtobjectRRRRRR(((sT/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/dummy_thread.pyt<module> s                    5