mirror of
https://github.com/fafhrd91/actix-net
synced 2025-06-28 02:59:01 +02:00
remove builder and introduce worker handle (#257)
This commit is contained in:
@ -2,9 +2,10 @@ use std::{future::Future, io};
|
||||
|
||||
use tokio::task::{JoinHandle, LocalSet};
|
||||
|
||||
/// Single-threaded runtime provides a way to start reactor and runtime on the current thread.
|
||||
/// A single-threaded runtime based on Tokio's "current thread" runtime.
|
||||
///
|
||||
/// See [crate root][crate] documentation for more details.
|
||||
/// All spawned futures will be executed on the current thread. Therefore, there is no `Send` bound
|
||||
/// on submitted futures.
|
||||
#[derive(Debug)]
|
||||
pub struct Runtime {
|
||||
local: LocalSet,
|
||||
@ -27,7 +28,7 @@ impl Runtime {
|
||||
}
|
||||
|
||||
/// Reference to local task set.
|
||||
pub(crate) fn local(&self) -> &LocalSet {
|
||||
pub(crate) fn local_set(&self) -> &LocalSet {
|
||||
&self.local
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user