zmp-bot/src/main.rs
2024-02-18 16:05:56 +01:00

32 lines
No EOL
920 B
Rust

mod minecraft;
mod discord;
#[tokio::main]
async fn main() {
/*
{
use parking_lot::deadlock;
use std::thread;
use std::time::Duration;
// Create a background thread which checks for deadlocks every 10s
thread::spawn(move || loop {
thread::sleep(Duration::from_secs(10));
let deadlocks = deadlock::check_deadlock();
if deadlocks.is_empty() {
continue;
}
println!("{} deadlocks detected", deadlocks.len());
for (i, threads) in deadlocks.iter().enumerate() {
println!("Deadlock #{i}");
for t in threads {
println!("Thread Id {:#?}", t.thread_id());
println!("{:#?}", t.backtrace());
}
}
});
}
*/
let (_dc, _mc) = tokio::join!(discord::main(), minecraft::main());
}