From 0c973ff0c65bf50c3ed43478354d3c5e687f0aa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?= <grubba@grubba.org> Date: Tue, 8 Feb 2000 19:35:16 +0100 Subject: [PATCH] More mutex/condvar-paranoia in Thread.Fifo and Thread.Queue. Rev: lib/modules/Thread.pmod:1.20 --- lib/modules/Thread.pmod | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/modules/Thread.pmod b/lib/modules/Thread.pmod index 607d8275a1..dc0027d7ba 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) -- GitLab