Skip to content

Commit

Permalink
dbg
Browse files Browse the repository at this point in the history
  • Loading branch information
mraszyk committed Oct 24, 2024
1 parent 20a51ba commit 1c05935
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rs/pocket_ic_server/src/state_api/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -729,11 +729,14 @@ impl ApiState {
where
F: FnOnce(InstanceId) -> PocketIc + std::marker::Send + 'static,
{
trace!("add_instance:start");
let mut instances = self.instances.lock().await;
trace!("add_instance:locked");
let instance_id = instances.len();
let instance = tokio::task::spawn_blocking(move || f(instance_id))
.await
.expect("Failed to create PocketIC instance");
trace!("add_instance:done_blocking");
let topology = instance.topology();
instances.push(Mutex::new(Instance {
progress_thread: None,
Expand Down

0 comments on commit 1c05935

Please sign in to comment.