diff options
Diffstat (limited to 'core/src/runtime')
-rw-r--r-- | core/src/runtime/executor.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/src/runtime/executor.rs b/core/src/runtime/executor.rs new file mode 100644 index 00000000..d171c6d5 --- /dev/null +++ b/core/src/runtime/executor.rs @@ -0,0 +1,11 @@ +use futures::Future; + +pub trait Executor { + fn new() -> Self; + + fn spawn(&self, future: impl Future<Output = ()> + Send + 'static); + + fn enter<R>(&self, f: impl FnOnce() -> R) -> R { + f() + } +} |