lscpu | grep -i Virtualization
VT-x
for IntelAMD-Vi
for AMD
use std::sync::mpsc; | |
use std::sync::{Arc, Mutex}; | |
use std::thread; | |
use std::time::Duration; | |
use rand::Rng; | |
struct Fork; | |
struct Philosopher { | |
name: String, | |
left_fork: Arc<Mutex<Fork>>, |