mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-20 00:00:08 +02:00
Remove executor from reactor.
In accordance with tokio-rs/tokio-rfcs#3, the executor functionality of Tokio is being removed and will be relocated into futures-rs as a "current thread" executor. This PR removes task execution from the code base. As a temporary mesure, all examples and tests are switched to using CpuPool. Depends on #19.
This commit is contained in:
+1
-2
@@ -93,13 +93,12 @@ impl TcpListener {
|
||||
// eventually.
|
||||
let (tx, rx) = oneshot::channel();
|
||||
let remote = self.io.remote().clone();
|
||||
remote.spawn(move |handle| {
|
||||
remote.run(move |handle| {
|
||||
let res = PollEvented::new(sock, handle)
|
||||
.map(move |io| {
|
||||
(TcpStream { io: io }, addr)
|
||||
});
|
||||
drop(tx.send(res));
|
||||
Ok(())
|
||||
});
|
||||
self.pending_accept = Some(rx);
|
||||
// continue to polling the `rx` at the beginning of the loop
|
||||
|
||||
Reference in New Issue
Block a user