1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//! A dependency-free executor, so that the expiry driver can run its own work.
//!
//! Core declares the type crate and the four port crates and nothing else, so
//! there is no runtime to borrow. The expiry driver is a thread of core's own —
//! a bounded intervention expires with nothing asking it to — and this is what
//! that thread runs its futures on: it parks itself until the future it was
//! given is ready.
//!
//! **A port implementation core drives has to be pollable off any runtime.**
//! Nothing here provides a reactor, so a port whose futures only make progress
//! inside some other executor would never complete on this thread. That is a
//! requirement on the adapters rather than a hidden assumption: core's own
//! asynchronous methods are ordinary futures its caller drives, and this
//! executor is reached only by the expiry driver.
use Future;
use ;
use Arc;
use ;
/// Unparks the thread that is blocking on a future.
;
/// Run one future to completion on the calling thread.