From 379dca552ca91d22ee007b42f93803ad3dc2b274 Mon Sep 17 00:00:00 2001 From: hozan23 Date: Wed, 20 Mar 2024 15:20:21 +0100 Subject: core: add the option to create a new task group without providing an executor & remove GlobalExecutor type --- p2p/src/peer/mod.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'p2p/src/peer') diff --git a/p2p/src/peer/mod.rs b/p2p/src/peer/mod.rs index 1e98f1b..1fc5ccf 100644 --- a/p2p/src/peer/mod.rs +++ b/p2p/src/peer/mod.rs @@ -11,10 +11,9 @@ use smol::{ }; use karyon_core::{ - async_util::{select, Either, TaskGroup, TaskResult}, + async_util::{select, Either, Executor, TaskGroup, TaskResult}, event::{ArcEventSys, EventListener, EventSys}, util::{decode, encode}, - GlobalExecutor, }; use karyon_net::Endpoint; @@ -67,7 +66,7 @@ impl Peer { codec: Codec, remote_endpoint: Endpoint, conn_direction: ConnDirection, - ex: GlobalExecutor, + ex: Executor<'static>, ) -> ArcPeer { Arc::new(Peer { id: id.clone(), -- cgit v1.2.3