Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325
Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325
Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325
Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325
Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325
Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325
Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325
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" Ú __enter__r' r# r( r. r r r r r X s
FTc C s t r
t‚ndadS )z^Set _interrupt flag to True to have start_new_thread raise
KeyboardInterrupt upon exiting.TN)r r r r r r r r œ s l )N)r0 Ú__all__ÚTIMEOUT_MAXÚRuntimeErrorr r r r r r r Úobjectr r r r r r r r Ú
s
@