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/listener.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'p2p/src/listener.rs') diff --git a/p2p/src/listener.rs b/p2p/src/listener.rs index 17aa187..c9b7390 100644 --- a/p2p/src/listener.rs +++ b/p2p/src/listener.rs @@ -3,9 +3,8 @@ use std::{future::Future, sync::Arc}; use log::{debug, error, info}; use karyon_core::{ - async_util::{TaskGroup, TaskResult}, + async_util::{Executor, TaskGroup, TaskResult}, crypto::KeyPair, - GlobalExecutor, }; use karyon_net::{tcp, tls, Conn, ConnListener, Endpoint}; @@ -42,7 +41,7 @@ impl Listener { connection_slots: Arc, enable_tls: bool, monitor: Arc, - ex: GlobalExecutor, + ex: Executor<'static>, ) -> Arc { Arc::new(Self { key_pair: key_pair.clone(), -- cgit v1.2.3