# HG changeset patch # User cin # Date 2015-04-15 04:30:20 # Node ID e6d4b41f0101bb778d4e6eabb0b0d3af6bd90337 # Parent 25cdef49102f39461e4e4609898226f2580cf535 fixed timeout handling in promises diff --git a/Implab/AbstractEvent.cs b/Implab/AbstractEvent.cs --- a/Implab/AbstractEvent.cs +++ b/Implab/AbstractEvent.cs @@ -172,8 +172,8 @@ namespace Implab { #region synchronization traits protected void WaitResult(int timeout) { - if (!IsResolved) - GetResolveSignal().Wait(timeout); + if (!(IsResolved || GetResolveSignal().Wait(timeout))) + throw new TimeoutException(); switch (m_state) { case SUCCEEDED_STATE: