Skip to content

Remove rtio #18557

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Nov 9, 2014
4 changes: 1 addition & 3 deletions src/libgreen/basic.rs
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@
use alloc::arc::Arc;
use std::sync::atomic;
use std::mem;
use std::rt::rtio::{EventLoop, IoFactory, RemoteCallback};
use std::rt::rtio::{EventLoop, RemoteCallback};
use std::rt::rtio::{PausableIdleCallback, Callback};
use std::rt::exclusive::Exclusive;

@@ -150,8 +150,6 @@ impl EventLoop for BasicLoop {
Box<RemoteCallback + Send>
}

fn io<'a>(&'a mut self) -> Option<&'a mut IoFactory> { None }

fn has_active_io(&self) -> bool { false }
}

4 changes: 2 additions & 2 deletions src/libgreen/simple.rs
Original file line number Diff line number Diff line change
@@ -16,7 +16,6 @@ use std::mem;
use std::rt::Runtime;
use std::rt::local::Local;
use std::rt::mutex::NativeMutex;
use std::rt::rtio;
use std::rt::task::{Task, BlockedTask, TaskOpts};

struct SimpleTask {
@@ -79,9 +78,10 @@ impl Runtime for SimpleTask {
_f: proc():Send) {
panic!()
}
fn local_io<'a>(&'a mut self) -> Option<rtio::LocalIo<'a>> { None }

fn stack_bounds(&self) -> (uint, uint) { panic!() }
fn stack_guard(&self) -> Option<uint> { panic!() }

fn can_block(&self) -> bool { true }
fn wrap(self: Box<SimpleTask>) -> Box<Any+'static> { panic!() }
}
9 changes: 0 additions & 9 deletions src/libgreen/task.rs
Original file line number Diff line number Diff line change
@@ -24,7 +24,6 @@ use std::raw;
use std::rt::Runtime;
use std::rt::local::Local;
use std::rt::mutex::NativeMutex;
use std::rt::rtio;
use std::rt::stack;
use std::rt::task::{Task, BlockedTask, TaskOpts};
use std::rt;
@@ -468,14 +467,6 @@ impl Runtime for GreenTask {
sched.run_task(me, sibling)
}

// Local I/O is provided by the scheduler's event loop
fn local_io<'a>(&'a mut self) -> Option<rtio::LocalIo<'a>> {
match self.sched.as_mut().unwrap().event_loop.io() {
Some(io) => Some(rtio::LocalIo::new(io)),
None => None,
}
}

fn stack_bounds(&self) -> (uint, uint) {
let c = self.coroutine.as_ref()
.expect("GreenTask.stack_bounds called without a coroutine");
Loading