summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2020-04-15 20:43:19 -0400
committerGitHub <noreply@github.com>2020-04-15 20:43:19 -0400
commitfab0204cbf20cc1be7874266325bf258fe0ecaca (patch)
treec67b3febde254ea36122966aadf13dfb62b67a0e /core
parent7cfd094359f7f94573b084328ad1a956dd70005d (diff)
Make writeSync, readSync, seekSync, openSync, isatty proper synchronous syscalls (#4762)
Diffstat (limited to 'core')
-rw-r--r--core/ops.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/ops.rs b/core/ops.rs
index 6b1aec6ab..16807196e 100644
--- a/core/ops.rs
+++ b/core/ops.rs
@@ -17,6 +17,9 @@ pub(crate) type PendingOpFuture =
pub type OpResult<E> = Result<Op<E>, E>;
+// TODO(ry) Op::Async should be Op::Async(Pin<Box<dyn Future<Output = Buf>>>)
+// The error should be encoded in the Buf. Notice how Sync ops do not return a
+// result. The Sync and Async should be symmetrical!
pub enum Op<E> {
Sync(Buf),
Async(OpAsyncFuture<E>),