pub fn run_until<F: Future>(&mut self, future: F) -> F::Output {
        let mut future = pin!(future);

        run_executor(|cx| {
            {
                // if our main task is done, so are we
                let result = future.as_mut().poll(cx);
                if let Poll::Ready(output) = result {
                    return Poll::Ready(output);
                }
            }

            let _ = self.poll_pool(cx);
            Poll::Pending
        })
    }
Runs all the tasks in the pool until the given future completes.

```
use futures::executor::LocalPool;

let mut pool = LocalPool::new();
# let my_app  = async {};

// run tasks in the pool until `my_app` completes
pool.run_until(my_app);
```

The function will block the calling thread *only* until the future `f`
completes; there may still be incomplete tasks in the pool, which will
be inert after the call completes, but can continue with further use of
one of the pool's run or poll methods. While the function is running,
however, all tasks in the pool will try to make progress.
futures-executor/src/local_pool.rs