summaryrefslogtreecommitdiffstats
path: root/core/src/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/runtime')
-rw-r--r--core/src/runtime/executor.rs11
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()
+ }
+}