Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 9cfcd836 authored by WILLIAMS Harvey's avatar WILLIAMS Harvey
Browse files

Using static lifetime for the DispatchHandle is no-go for unit tests which...

Using static lifetime for the DispatchHandle is no-go for unit tests which shares the same memory space
parent dc763b98
Branches
No related tags found
No related merge requests found
use tokio::sync::{mpsc, oneshot};
use std::{collections::HashMap, sync::LazyLock};
/// We use a static dispatch handle which other actors can freely clone and use.
pub static DISPATCHER: LazyLock<DispatchHandle> = LazyLock::new(DispatchHandle::new);
use std::collections::HashMap;
/// The buffer size of the channel used to communicate with the dispatch actor.
const ACTOR_MESSAGE_BUFFER: usize = 1024;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment