3 \@stdddddddgZdZeZifd dZd dZd dZd dZdddZddZ Gddde Z da da ddZd S)errorstart_new_threadexit get_ident allocate_lockinterrupt_mainLockTypec Cst|ttkrtdt|ttkr4tdday|||Wn.tk rZYnddl}|jYnXdatrdat dS)Nz2nd arg must be a tuplez3rd arg must be a dictFT) typetuple TypeErrordict_main SystemExit traceback print_exc _interruptKeyboardInterrupt)Zfunctionargskwargsrr%/usr/lib64/python3.6/_dummy_thread.pyrs cCstdS)N)rrrrrr=scCsdS)NrrrrrrAscCstS)N)rrrrrrJsNcCs|dk rtddS)Nz'setting thread stack size not supportedr )r)sizerrr stack_sizeNsrcCstS)N)rrrrr _set_sentinelTsrc@sBeZdZddZdddZeZddZd d Zd d Zd dZ dS)rcCs d|_dS)NF) locked_status)selfrrr__init__cszLockType.__init__NrcCsH|dks |rd|_dS|js&d|_dS|dkr@ddl}|j|dSdS)NTr F)rtimeZsleep)rZwaitflagZtimeoutr!rrracquirefs  zLockType.acquirecCs |jdS)N)release)rtypvaltbrrr__exit__szLockType.__exit__cCs|js td|_dS)NFT)rr)rrrrr#szLockType.releasecCs|jS)N)r)rrrrlockedszLockType.lockedcCs*d|jr dnd|jj|jjtt|fS)Nz<%s %s.%s object at %s>r(Zunlocked)r __class__ __module__ __qualname__hexid)rrrr__repr__s  zLockType.__repr__r)Nr) __name__r*r+r r" __enter__r'r#r(r.rrrrrXs   FTcCstr tndadS)NT)rrrrrrrrsl)N)__all__ TIMEOUT_MAX RuntimeErrorrrrrrrrobjectrrrrrrrrs    @