建立一个变量比如叫 进来一个人。。。
$ V s! B% T- _$ b; Z' a& E有人进来的时候设这个变量为真 3 p6 B3 c `9 B* m0 \2 N/ W3 x# b
' }( P5 `* R0 J5 W
监视代码是
0 I% u1 b. b. B5 n4 t! Z2 B" kwhile true loop; H' {- O9 w% Y( d# m1 W, U
if not 进来一个人 then
% H- d/ V; A& y, F' _9 f1 ~waituntil 进来一个人 prio 1
8 C/ S, {3 ^9 y5 e进来一个人:=false
* c" }; L* [, v: c2 k. f. a0 i/ Bend/ Y& C7 M6 J/ {0 N* L" h$ c5 p" V$ _
循环体
6 _) a9 L9 H9 B4 t4 n, j! ]0 M" Qend |