sociomantic-tsunami / dlsproto

Distributed Log Store protocol definition, client, fake node, and tests
Boost Software License 1.0
3 stars 18 forks source link

Use TaskEvent to suspend/resume tasks in DlsClient test #37

Closed daniel-zullo closed 6 years ago

daniel-zullo commented 6 years ago

It makes easier to read the code, debug and actually safer if TaskEvent is used to suspend/resume a task rather than using directly the plain suspend/resume from the task.

daniel-zullo commented 6 years ago

Updated based on a comment from Gavin.

Previous head was 36815e9, new head at 14218ea. Diff between heads are: ```diff diff --git a/src/dlstest/DlsClient.d b/src/dlstest/DlsClient.d index 6aece73..d0f32d4 100644 --- a/src/dlstest/DlsClient.d +++ b/src/dlstest/DlsClient.d @@ -98,8 +98,7 @@ class DlsClient public void wait ( ) { - if ( this.pending > 0 ) - this.task_event.wait(); + this.task_event.wait(); enforce(!this.error, idup(this.error_msg)); } ```
daniel-zullo commented 6 years ago

Thanks!