Critics have remarked that those four worthies were truly peerless throughout the ages; yet the present falls short of the pastβthe ancients favored unadorned simplicity, whereas the moderns prefer refined elegance. Styles of substance and ornament rise and fall in succession, shifting with the changing mores of the times; such evolution is simply the natural order of things. The ideal lies in honoring antiquity without clashing with the present, and embracing modernity without succumbing to its flawsβembodying that perfect balance of substance and refinement that defines the true gentleman. There is surely no need to abandon a carved palace in favor of a cave dwelling, or to trade a jade carriage for a primitive cart with solid wooden wheels.
Current path: lib64/python3.6/__pycache__/
β¬οΈ Go up: /lib64/python3.6
3
\οΏ½ οΏ½ @ sx d Z dddddddgZdZeZi fd
dοΏ½ZddοΏ½ ZddοΏ½ Zd
dοΏ½ ZdddοΏ½Z ddοΏ½ Z
G ddοΏ½ deοΏ½Zda
daddοΏ½ ZdS )a/ 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
οΏ½errorοΏ½start_new_threadοΏ½exitοΏ½ get_identοΏ½
allocate_lockοΏ½interrupt_mainοΏ½LockTypeοΏ½ οΏ½ c C sοΏ½ t |οΏ½t tοΏ½ οΏ½krtdοΏ½οΏ½t |οΏ½t tοΏ½ οΏ½kr4tdοΏ½οΏ½day| ||οΏ½ W n. tk
rZ Y n ddl}|jοΏ½ Y nX datrοΏ½dat οΏ½dS )aοΏ½ 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.
z2nd arg must be a tuplez3rd arg must be a dictFοΏ½ NT)
οΏ½typeοΏ½tupleοΏ½ TypeErrorοΏ½dictοΏ½_mainοΏ½
SystemExitοΏ½ tracebackοΏ½ print_excοΏ½
_interruptοΏ½KeyboardInterrupt)ZfunctionοΏ½argsοΏ½kwargsr οΏ½ r οΏ½%/usr/lib64/python3.6/_dummy_thread.pyr s
c C s t οΏ½dS )z'Dummy implementation of _thread.exit().N)r r r r r r = s c C s dS )zοΏ½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.
οΏ½ οΏ½οΏ½οΏ½r r r r r r A s c C s t οΏ½ S )z0Dummy implementation of _thread.allocate_lock().)r r r r r r J s Nc C s | dk rt dοΏ½οΏ½dS )z-Dummy implementation of _thread.stack_size().Nz'setting thread stack size not supportedr
)r )οΏ½sizer r r οΏ½
stack_sizeN s r c C s t οΏ½ S )z0Dummy implementation of _thread._set_sentinel().)r r r r r οΏ½
_set_sentinelT s r c @ sF e Zd ZdZddοΏ½ ZdddοΏ½ZeZdd οΏ½ Zd
dοΏ½ Zdd
οΏ½ Z ddοΏ½ Z
dS )r aοΏ½ 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.
c C s
d| _ d S )NF)οΏ½
locked_status)οΏ½selfr r r οΏ½__init__c s zLockType.__init__Nr c C sH |dks|rd| _ dS | j s&d| _ dS |dkr@ddl}|j|οΏ½ dS dS )aοΏ½ 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.
NTr
F)r οΏ½timeZsleep)r ZwaitflagZtimeoutr! r r r οΏ½acquiref s
zLockType.acquirec C s | j οΏ½ d S )N)οΏ½release)r οΏ½typοΏ½valοΏ½tbr r r οΏ½__exit__οΏ½ s zLockType.__exit__c C s | j s
tοΏ½d| _ dS )zRelease the dummy lock.FT)r r )r r r r r# οΏ½ s zLockType.releasec C s | j S )N)r )r r r r οΏ½lockedοΏ½ s zLockType.lockedc C s* d| j rdnd| jj| jjtt| οΏ½οΏ½f S )Nz<%s %s.%s object at %s>r( Zunlocked)r οΏ½ __class__οΏ½
__module__οΏ½__qualname__οΏ½hexοΏ½id)r r r r οΏ½__repr__οΏ½ s
zLockType.__repr__r )Nr )οΏ½__name__r* r+ οΏ½__doc__r r"