1
0
mirror of https://github.com/fafhrd91/actix-net synced 2025-08-23 01:55:07 +02:00

return io::Result from run method, remove Handle

This commit is contained in:
Nikolay Kim
2019-03-06 10:24:58 -08:00
parent 25f1eae51f
commit c03d869694
6 changed files with 28 additions and 74 deletions

View File

@@ -1,4 +1,5 @@
use std::cell::RefCell;
use std::io;
use futures::sync::mpsc::UnboundedSender;
@@ -109,7 +110,7 @@ impl System {
/// This function will start tokio runtime and will finish once the
/// `System::stop()` message get called.
/// Function `f` get called within tokio runtime context.
pub fn run<F>(f: F) -> i32
pub fn run<F>(f: F) -> io::Result<()>
where
F: FnOnce() + 'static,
{