You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/hyperlight_wasm/src/sandbox/loaded_wasm_sandbox.rs
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ pub struct LoadedWasmSandbox {
42
42
// because of this we cannot implement drop without making inner an Option (alternatively we could make MultiUseSandbox Copy but that would introduce other issues)
43
43
inner:Option<MultiUseSandbox>,
44
44
// The state the sandbox was in before loading a wasm module. Used for transitioning back to a `WasmSandbox` (unloading the wasm module).
45
-
runtime_snapshot:Option<Snapshot>,
45
+
runtime_snapshot:Option<Arc<Snapshot>>,
46
46
}
47
47
48
48
implLoadedWasmSandbox{
@@ -86,7 +86,7 @@ impl LoadedWasmSandbox {
86
86
/// Returns `Err(HyperlightError::PoisonedSandbox)` if the sandbox is in a
87
87
/// poisoned state. Use [`restore()`](Self::restore) with a previously
88
88
/// taken snapshot to recover before taking a new snapshot.
89
-
pubfnsnapshot(&mutself) -> Result<Snapshot>{
89
+
pubfnsnapshot(&mutself) -> Result<Arc<Snapshot>>{
90
90
match&mutself.inner{
91
91
Some(inner) => inner.snapshot(),
92
92
None => log_then_return!("No inner MultiUseSandbox to snapshot"),
@@ -105,7 +105,7 @@ impl LoadedWasmSandbox {
105
105
/// 1. Clear the poisoned state
106
106
/// 2. Reset memory to the snapshot state
107
107
/// 3. Allow subsequent [`call_guest_function()`](Self::call_guest_function) calls to succeed
0 commit comments