summaryrefslogtreecommitdiff
path: root/src/ops.rs
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2018-10-19 11:40:54 -0400
committerRyan Dahl <ry@tinyclouds.org>2018-10-20 12:39:56 -0700
commit2c33334d2841d6fe2824c50d36f0a082ace186ec (patch)
tree33ea0d6cf8335ed7de3cdaf22b58dc9fc9e74079 /src/ops.rs
parent2af25b1957d6415bf4ed89e1e01d379346d93ba8 (diff)
Optimization: eager read
TCP sockets should attempt the non-blocking read in the main thread.
Diffstat (limited to 'src/ops.rs')
-rw-r--r--src/ops.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ops.rs b/src/ops.rs
index 2d7072dd0..9ffc96190 100644
--- a/src/ops.rs
+++ b/src/ops.rs
@@ -664,7 +664,7 @@ fn op_read(
match resources::lookup(rid) {
None => odd_future(errors::bad_resource()),
Some(resource) => {
- let op = tokio_io::io::read(resource, data)
+ let op = resources::eager_read(resource, data)
.map_err(|err| DenoError::from(err))
.and_then(move |(_resource, _buf, nread)| {
let builder = &mut FlatBufferBuilder::new();