title: Best method to "block" until certain condition is met
body: <p>I would like to create some method to be used in a generic way, were it would block (unless a certain timeout expires) until a given condition is met.</p>
  
  <p>The usage in code would be something similar to:</p>
  
  <pre><code>WaitUntil( condition );
  </code></pre>
  
  <p>I have tried implementing it using a While ( .. ) loop, however this seems like a waste.</p>
  
  <p>In current implementation, i am initializing a 'one-off' timer that expires at TIMEOUT. I am running a while loop, and checking if the timer has timed out or not, throwing an exception if it did.</p>
  
  <p>Are there any simple yet effective techniques for implementing such a method ?</p>