Now with Atomicity
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
extern crate rustijvm;
|
||||
|
||||
use std::io::{Cursor, Read, Seek, SeekFrom};
|
||||
use std::rc::Rc;
|
||||
use std::sync::Mutex;
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
fn steps(machine: &mut rustijvm::Machine, num: usize) {
|
||||
for _ in 0..num {
|
||||
@@ -84,7 +83,7 @@ fn task4_complex_load() {
|
||||
|
||||
#[test]
|
||||
fn task4_iteration_load() {
|
||||
let rc = Rc::new(Mutex::new(Cursor::new(Vec::new())));
|
||||
let rc = Arc::new(Mutex::new(Cursor::new(Vec::new())));
|
||||
|
||||
let mut machine = rustijvm::Machine::new_from_file("files/task4/LoadTest4.ijvm").unwrap();
|
||||
machine.set_output(rc.clone());
|
||||
|
||||
Reference in New Issue
Block a user