diff --git a/lib/modules/Thread.pmod b/lib/modules/Thread.pmod index 607d8275a143811f79e9a372d909ce79f6a1c8d2..dc0027d7ba6661f34e16f92601852e19801b1557 100644 --- a/lib/modules/Thread.pmod +++ b/lib/modules/Thread.pmod @@ -32,8 +32,9 @@ class Fifo { w_cond::broadcast(); }else{ num--; - w_cond::signal(); + w_cond::broadcast(); } + key = 0; return tmp; } @@ -53,6 +54,7 @@ class Fifo { ptr=num=0; buffer=allocate(sizeof(buffer)); // Throw away any references. } + key = 0; w_cond::broadcast(); return ret; } @@ -68,8 +70,9 @@ class Fifo { r_cond::broadcast(); }else{ num++; - r_cond::signal(); + r_cond::broadcast(); } + key = 0; } void create(int|void size)