//! Driving a GPU future to completion on a thread that owns the device.
use crate;
use Future;
use pin;
use ;
/// Runs `future` to completion, polling `device` whenever it is pending.
///
/// GPU futures resolve only as the device is polled, so a plain executor would
/// wait forever. This is the blocking bridge for callers with no event loop of
/// their own: it spends the thread, where an embedder with a frame loop calls
/// [`Device::poll`] once per frame instead. A poll that fails is not reported
/// here; the future observes the same failure and resolves with it.