weired implementation of stream parsing cbor items from a unix sock, but it works
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
use core::fmt;
|
||||
use std::collections::HashMap;
|
||||
use std::fs::create_dir;
|
||||
use std::thread::JoinHandle;
|
||||
use std::{thread, vec};
|
||||
use crossbeam::channel;
|
||||
use std::sync::{Arc, Mutex};
|
||||
@@ -51,7 +52,7 @@ pub struct Instance {
|
||||
context: Vec<MizeId>,
|
||||
threads: Vec<String>,
|
||||
#[cfg(feature = "async")]
|
||||
runtime: Arc<Mutex<Runtime>>,
|
||||
pub runtime: Arc<Mutex<Runtime>>,
|
||||
}
|
||||
|
||||
pub struct InstanceRef {
|
||||
@@ -218,6 +219,12 @@ impl Instance {
|
||||
let runtime_inner = self.runtime.lock().unwrap();
|
||||
runtime_inner.spawn(func);
|
||||
}
|
||||
|
||||
pub fn wait(&self) {
|
||||
loop {
|
||||
thread::sleep_ms(10000000)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Debug for Instance {
|
||||
|
||||
Reference in New Issue
Block a user