Spade
Mini Shell
�
V
�Qc@s^ddlZddlZdefd��YZddd��YZd�Zd�Ze�dS( i����NtKilledcBseZRS((t__name__t
__module__(((s./usr/lib64/python2.7/Demo/threads/Generator.pyRst GeneratorcBs>eZd�Zd�Zd�Zd�Zd�Zd�ZRS(cCsstj�|_tj�|_|jj�|jj�||_||_d|_d|_tj |j
d�dS(Ni((tthreadt
allocate_locktgetlocktputlocktacquiretfunctargstdonetkilledtstart_new_threadt_start(tselfR R
((s./usr/lib64/python2.7/Demo/threads/Generator.pyt__init__s
cCsyzO|jj�|jsNyt|j|f|j�WqNtk
rJqNXnWd|jstd|_|jj �nXdS(Ni(
RRRtapplyR R
RRRtrelease(R((s./usr/lib64/python2.7/Demo/threads/Generator.pyRs
cCsN|jrtd�n||_|jj�|jj�|jrJt�ndS(Ns
put() called on killed
generator(Rt TypeErrortvalueRRRRR(RR((s./usr/lib64/python2.7/Demo/threads/Generator.pytput%s
cCsH|jrtd�n|jj�|jj�|jrAt�n|jS(Ns
get() called on killed
generator( RRRRRRRtEOFErrorR(R((s./usr/lib64/python2.7/Demo/threads/Generator.pytget/s
cCs/|jrtd�nd|_|jj�dS(Ns!kill()
called on killed
generatori(RRRR(R((s./usr/lib64/python2.7/Demo/threads/Generator.pytkill9s cCst|j|j�S(N(RR R
(R((s./usr/lib64/python2.7/Demo/threads/Generator.pytclone@s(RRRRRRRR(((s./usr/lib64/python2.7/Demo/threads/Generator.pyR s
c
Cs�d\}}}}}x�||d|d|d}}}||||||||||f\}}}}||||}} xU|| kr�|jt|��d||d||}}||||}} q�WqdS(Nlllll
(lllll(Rtint(
tgtktatbta1tb1tptqtdtd1((s./usr/lib64/python2.7/Demo/threads/Generator.pytpiCs$6cCs�ttd�}|j�ttd�}xtd�D]}|j�Gq5WH|j�}|j�x|j�Gtjj�qcdS(Ni
((( RR%RtrangeRRtsyststdouttflush(Rtith((s./usr/lib64/python2.7/Demo/threads/Generator.pyttestPs
((R'Rt ExceptionRRR%R,(((s./usr/lib64/python2.7/Demo/threads/Generator.pyt<module>s: