MCPcopy Create free account
hub / github.com/consensus-shipyard/ipc / take_dropper

Method take_dropper

fendermint/testing/materializer/src/docker/mod.rs:282–289  ·  view source on GitHub ↗

Replace the dropper with a new one and return the existing one so that we can await all the drop tasks being completed.

(&mut self)

Source from the content-addressed store, hash-verified

280
281 /// Replace the dropper with a new one and return the existing one so that we can await all the drop tasks being completed.
282 pub fn take_dropper(&mut self) -> DropHandle {
283 let (mut drop_handle, mut drop_chute) = dropper::start(self.docker.clone());
284 std::mem::swap(&mut drop_handle, &mut self.drop_handle);
285 std::mem::swap(&mut drop_chute, &mut self.drop_chute);
286 // By dropping the `drop_chute` the only the existing docker constructs will keep a reference to it.
287 // The caller can decide when it's time to wait on the handle, when the testnet have been dropped.
288 drop_handle
289 }
290
291 /// Path to a directory based on a resource name.
292 fn path<T: AsRef<ResourceName>>(&self, name: T) -> PathBuf {

Callers 1

make_testnetFunction · 0.80

Calls 1

startFunction · 0.70

Tested by 1

make_testnetFunction · 0.64