same measures for ManualEvent
This commit is contained in:
parent
bf9d736c4f
commit
788973f628
|
@ -1027,8 +1027,8 @@ struct ManualEvent {
|
||||||
int ec = this.emitCount;
|
int ec = this.emitCount;
|
||||||
|
|
||||||
acquireThreadWaiter((scope ThreadWaiter w) {
|
acquireThreadWaiter((scope ThreadWaiter w) {
|
||||||
while (ec <= emit_count) {
|
while (ec - emit_count <= 0) {
|
||||||
w.wait!interruptible(timeout != Duration.max ? target_timeout - now : Duration.max, ms_threadEvent, () => this.emitCount > emit_count);
|
w.wait!interruptible(timeout != Duration.max ? target_timeout - now : Duration.max, ms_threadEvent, () => (this.emitCount - emit_count) > 0);
|
||||||
ec = this.emitCount;
|
ec = this.emitCount;
|
||||||
|
|
||||||
if (timeout != Duration.max) {
|
if (timeout != Duration.max) {
|
||||||
|
|
Loading…
Reference in a new issue