Skip to main content

selene_daemon/
lib.rs

1// IPC
2pub mod daemon;
3
4pub mod config;
5
6mod ipc;
7
8use std::sync::atomic::AtomicBool;
9
10pub use ipc::*;
11
12// Engines
13/// Defaults to `false`, if `true`, a shutdown has been requested due to a critical thread returning
14pub(crate) static SHUTDOWN: AtomicBool = AtomicBool::new(false);
15
16pub mod decoder;
17pub mod event_handler;
18pub mod listener;
19pub mod player;
20
21// Features
22#[cfg(feature = "mpris")]
23pub mod mpris;
24
25// Other
26pub mod playlist;
27
28/// Sleep the current thread for 1ms. Used to avoid busy looping
29pub fn wait() {
30    std::thread::sleep(std::time::Duration::from_millis(1));
31}