mirror of https://github.com/m-labs/artiq.git
Rust: unborrow cache after kernel stops.
This commit is contained in:
parent
e92f20546a
commit
3e829d0d01
|
@ -44,4 +44,10 @@ impl Cache {
|
|||
});
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub unsafe fn unborrow(&mut self) {
|
||||
for (_key, entry) in self.entries.iter_mut() {
|
||||
entry.borrowed = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -381,6 +381,7 @@ fn process_kern_message(waiter: Waiter,
|
|||
kern::RunFinished => {
|
||||
kernel::stop();
|
||||
session.kernel_state = KernelState::Absent;
|
||||
unsafe { session.congress.cache.unborrow() }
|
||||
|
||||
match stream {
|
||||
None => return Ok(true),
|
||||
|
@ -392,6 +393,7 @@ fn process_kern_message(waiter: Waiter,
|
|||
kern::RunException { exception: ref exn, backtrace } => {
|
||||
kernel::stop();
|
||||
session.kernel_state = KernelState::Absent;
|
||||
unsafe { session.congress.cache.unborrow() }
|
||||
|
||||
match stream {
|
||||
None => {
|
||||
|
|
Loading…
Reference in New Issue