Skip to content
Snippets Groups Projects
Commit 1de8a9f7 authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Thread.Queue [Paranoia]: Broadcast the changed state.

This is intended to ensure that the state-changed signal
is not lost.

Consider the case when there is a thread that listens on the
condition, but does not act on it; it could starve the threads
that do intend to act on it.

Fixes [PIKE-140].
parent b5faf3dc
No related branches found
No related tags found
No related merge requests found
......@@ -378,7 +378,7 @@ optional class Queue {
buffer[w_ptr] = value;
w_ptr++;
int items = w_ptr - r_ptr;
r_cond::signal();
r_cond::broadcast();
key=0;
return items;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment