???<!-- GIF89;a -->
123123123123
.....................................................................................................................................???<!-- GIF89;a -->
123123123123
.....................................................................................................................................ó
¿œ^c           @   s^   d  d l  Z  d  d l Z d e f d „  ƒ  YZ d d d „  ƒ  YZ d „  Z d „  Z e ƒ  d S(	   iÿÿÿÿNt   Killedc           B   s   e  Z RS(    (   t   __name__t
   __module__(    (    (    s.   /usr/lib64/python2.7/Demo/threads/Generator.pyR       s   t	   Generatorc           B   s>   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   c         C   ss   t  j ƒ  |  _ t  j ƒ  |  _ |  j j ƒ  |  j j ƒ  | |  _ | |  _ d |  _ d |  _ t  j	 |  j
 d ƒ d  S(   Ni    (    (   t   threadt   allocate_lockt   getlockt   putlockt   acquiret   funct   argst   donet   killedt   start_new_threadt   _start(   t   selfR	   R
   (    (    s.   /usr/lib64/python2.7/Demo/threads/Generator.pyt   __init__   s    				c         C   sy   zO |  j  j ƒ  |  j sN y t |  j |  f |  j ƒ WqN t k
 rJ qN Xn  Wd  |  j st d |  _ |  j j	 ƒ  n  Xd  S(   Ni   (
   R   R   R   t   applyR	   R
   R    R   R   t   release(   R   (    (    s.   /usr/lib64/python2.7/Demo/threads/Generator.pyR      s    			c         C   sN   |  j  r t d ‚ n  | |  _ |  j j ƒ  |  j j ƒ  |  j  rJ t ‚ n  d  S(   Ns    put() called on killed generator(   R   t	   TypeErrort   valueR   R   R   R   R    (   R   R   (    (    s.   /usr/lib64/python2.7/Demo/threads/Generator.pyt   put%   s    			c         C   sH   |  j  r t d ‚ n  |  j j ƒ  |  j j ƒ  |  j rA t ‚ n  |  j S(   Ns    get() called on killed generator(	   R   R   R   R   R   R   R   t   EOFErrorR   (   R   (    (    s.   /usr/lib64/python2.7/Demo/threads/Generator.pyt   get/   s    			c         C   s/   |  j  r t d ‚ n  d |  _  |  j j ƒ  d  S(   Ns!   kill() called on killed generatori   (   R   R   R   R   (   R   (    (    s.   /usr/lib64/python2.7/Demo/threads/Generator.pyt   kill9   s    		c         C   s   t  |  j |  j ƒ S(   N(   R   R	   R
   (   R   (    (    s.   /usr/lib64/python2.7/Demo/threads/Generator.pyt   clone@   s    (   R   R   R   R   R   R   R   R   (    (    (    s.   /usr/lib64/python2.7/Demo/threads/Generator.pyR   	   s   			
	
	c   
      C   sç   d \ } } } } } xË | | d | d | d } } } | | | | | | | | | | f \ } } } } | | | | } }	 xU | |	 k rÞ |  j  t | ƒ ƒ d | | d | | } } | | | | } }	 qŠ Wq Wd  S(   Nl    l    l    l    l   
 (   l    l    l    l    l    (   R   t   int(
   t   gt   kt   at   bt   a1t   b1t   pt   qt   dt   d1(    (    s.   /usr/lib64/python2.7/Demo/threads/Generator.pyt   piC   s    $6c          C   s‚   t  t d ƒ }  |  j ƒ  t  t d ƒ }  x t d ƒ D] } |  j ƒ  Gq5 WH|  j ƒ  } |  j ƒ  x | j ƒ  Gt j j ƒ  qc Wd  S(   Ni
   (    (    (	   R   R%   R   t   rangeR   R   t   syst   stdoutt   flush(   R   t   it   h(    (    s.   /usr/lib64/python2.7/Demo/threads/Generator.pyt   testP   s    
 

(    (   R'   R   t	   ExceptionR    R   R%   R,   (    (    (    s.   /usr/lib64/python2.7/Demo/threads/Generator.pyt   <module>   s   :		