title: Why is `Future::poll` not called repeatedly after returning `NotReady`?
body: <p>Consider the following code</p>
  
  <pre><code>extern crate futures; // v0.1 (old)
  
  use std::sync::{atomic, Arc};
  use futures::*;
  
  struct F(Arc&lt;atomic::AtomicBool&gt;);
  
  impl Future for F {
      type Item = ();
      type Error = ();
  
      fn poll(&amp;mut self) -&gt; Result&lt;Async&lt;Self::Item&gt;, Self::Error&gt; {
          println!("Check if flag is set");
          if self.0.load(atomic::Ordering::Relaxed) {
              Ok(Async::Ready(()))
          } else {
              Ok(Async::NotReady)
          }
      }
  }
  
  fn main() {
      let flag = Arc::new(atomic::AtomicBool::new(false));
      let future = F(flag.clone());
      ::std::thread::spawn(move || {
          ::std::thread::sleep_ms(10);
          println!("set flag");
          flag.store(true, atomic::Ordering::Relaxed);
      });
      // ::std::thread::sleep_ms(20);
      let result = future.wait();
      println!("result: {:?}", result);
  }
  </code></pre>
  
  <p>The spawned thread sets a flag, which the future waits for.
  We also sleep the spawned thread, so the initial <code>.poll()</code> call from <code>.wait()</code> is before the flag is set. This causes <code>.wait()</code> to block (seemingly) indefinitely. If we uncomment the other <code>thread::sleep_ms</code>, <code>.wait()</code> returns, and prints out the result (<code>()</code>).</p>
  
  <p>I would expect the current thread to try to resolve the future by calling <code>poll</code> multiple times, since we're blocking the current thread. However, this is not happening.</p>
  
  <p>I have tried to read <a href="https://tokio.rs/docs/going-deeper/tasks/" rel="nofollow noreferrer">some docs</a>, and it seems like the problem is that the thread is <code>park</code>ed after getting <code>NotReady</code> from the <code>poll</code> the first time. However, it is not clear to me <em>why</em> this is, or how it is possible to work around this.</p>
  
  <p>What am I missing?</p>