File: //proc/3/root/proc/2/task/2/root/usr/lib/python2.4/Demo/threads/sync.pyo
mò
‚=5Dc @ sº d k Z d f d „ ƒ YZ d f d „ ƒ YZ d f d „ ƒ YZ d f d „ ƒ YZ d f d
„ ƒ YZ d „ Z d „ Z d
„ Z d „ Z d „ Z
d „ Z e d j o e ƒ n d S( Nt conditionc B sD t Z d d „ Z d „ Z d „ Z d „ Z d „ Z d d „ Z RS( Nc C s² | d j o t i ƒ | _ n7 t | d ƒ o t | d ƒ o
| | _ n
t d ‚ t i ƒ | _ | i i ƒ t i ƒ | _
d | _ d | _ d | _
d | _ d | _ d S( Nt acquiret releases. condition constructor requires a lock argumenti ( t lockt Nonet threadt
allocate_lockt selft mutext hasattrt TypeErrort checkoutR t idlockt idt waitingt pendingt toreleaset releasing( R R ( ( t' /usr/lib/python2.4/Demo/threads/sync.pyt __init__ s
c C s | i i ƒ d S( N( R R R ( R ( ( R R * s c C s | i i ƒ d S( N( R R R ( R ( ( R R - s c C s= | i | i | i } } } | i ƒ p
t d ‚ n | i ƒ | i } | i d | _ | i
ƒ | i
ƒ xB | i ƒ | i ƒ | | i j o Pn | i
ƒ | i
ƒ qq W| i d | _ | i d | _ | i o | i
ƒ n; d | _
| i | i j o
d j n o
d | _ n | i
ƒ | i ƒ d S( Ns1 condition must be .acquire'd when .wait() invokedi i ( R R R R t lockedt
ValueErrorR R
t myidR R R R R ( R R R R R ( ( R t wait0 s.
$
c C s | i d ƒ d S( Ni ( R t broadcast( R ( ( R t signalN s iÿÿÿÿc C sö | d j o t d | f ‚ n | d j o d Sn | i i ƒ | i o0 | i | i | _ d | _ | i d | _ n | d j o | i | _ n t | i | i | ƒ | _ | i o% | i
o d | _
| i i ƒ n | i i ƒ d S( Niÿÿÿÿs .broadcast called with num %ri i (
t numR R R R R R R
R t minR R R ( R R ( ( R R Q s"