kairoi 0.1.0

Another application-level tracing library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::event::Event;
use crossbeam_channel::{bounded, Receiver, Sender};
use lazy_static::lazy_static;

lazy_static! {
    static ref CH: (Sender<Event>, Receiver<Event>) = bounded::<Event>(2048);
}

pub(crate) fn tx() -> &'static Sender<Event> {
    &CH.0
}

pub(crate) fn rx() -> &'static Receiver<Event> {
    &CH.1
}