mirror of
https://github.com/fafhrd91/actix-net
synced 2025-09-01 00:17:00 +02:00
Change with_tokio_rt to accept Arc<Runtime>.
This allows to share tokio runtimes across different sub-systems inside your application. Signed-off-by: Gerd Zellweger <mail@gerdzellweger.com>
This commit is contained in:
@@ -10,6 +10,7 @@ fn main() {
|
||||
.worker_threads(2)
|
||||
.enable_all()
|
||||
.build()
|
||||
.map(std::sync::Arc::new)
|
||||
.unwrap()
|
||||
})
|
||||
.block_on(async_main());
|
||||
|
Reference in New Issue
Block a user