Same with sync

This commit is contained in:
2018-05-23 20:31:53 +02:00
parent 071921a9cf
commit 9f7f9598db

View File

@@ -31,8 +31,8 @@ pub struct Machine {
#[cfg(feature = "bonus:heap")]
pub heap: Heap,
pub stream_in: Box<Read + Send>,
pub stream_out: Rc<Mutex<Write + Send>>,
pub stream_in: Box<Read + Send + Sync>,
pub stream_out: Rc<Mutex<Write + Send + Sync>>,
}
@@ -148,11 +148,11 @@ impl Machine {
Ok(self.block.read_u8()? as usize)
}
pub fn set_input(&mut self, instream: Box<Read + Send>) {
pub fn set_input(&mut self, instream: Box<Read + Send + Sync>) {
self.stream_in = instream;
}
pub fn set_output(&mut self, outstream: Rc<Mutex<Write + Send>>) {
pub fn set_output(&mut self, outstream: Rc<Mutex<Write + Send + Sync>>) {
self.stream_out = outstream;
}
}