diff options
author | hozan23 <hozan23@proton.me> | 2024-03-20 15:20:21 +0100 |
---|---|---|
committer | hozan23 <hozan23@proton.me> | 2024-03-20 15:20:21 +0100 |
commit | 379dca552ca91d22ee007b42f93803ad3dc2b274 (patch) | |
tree | 1ba10573b6ec5213baf46f6ab9c3767e0daa4eed /p2p/src/discovery/lookup.rs | |
parent | 340957fec147f4429796413f27bbd9b84ba6f141 (diff) |
core: add the option to create a new task group without providing an
executor & remove GlobalExecutor type
Diffstat (limited to 'p2p/src/discovery/lookup.rs')
-rw-r--r-- | p2p/src/discovery/lookup.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/p2p/src/discovery/lookup.rs b/p2p/src/discovery/lookup.rs index 1d73306..c81fbc6 100644 --- a/p2p/src/discovery/lookup.rs +++ b/p2p/src/discovery/lookup.rs @@ -5,7 +5,11 @@ use log::{error, trace}; use rand::{rngs::OsRng, seq::SliceRandom, RngCore}; use smol::lock::{Mutex, RwLock}; -use karyon_core::{async_util::timeout, crypto::KeyPair, util::decode, GlobalExecutor}; +use karyon_core::{ + async_util::{timeout, Executor}, + crypto::KeyPair, + util::decode, +}; use karyon_net::{Conn, Endpoint}; @@ -60,7 +64,7 @@ impl LookupService { table: Arc<Mutex<RoutingTable>>, config: Arc<Config>, monitor: Arc<Monitor>, - ex: GlobalExecutor, + ex: Executor<'static>, ) -> Self { let inbound_slots = Arc::new(ConnectionSlots::new(config.lookup_inbound_slots)); let outbound_slots = Arc::new(ConnectionSlots::new(config.lookup_outbound_slots)); |