| 144 | } |
| 145 | |
| 146 | pub fn start(mut self) -> JoinHandle<Result<()>> { |
| 147 | let local_key = self.local_key; |
| 148 | let ctx = context("Sandbox".to_owned(), self.ty.clone(), local_key); |
| 149 | crate::rt::task::spawn(async move { |
| 150 | futures_util::try_join!( |
| 151 | self.actor.start( |
| 152 | ctx.clone(), |
| 153 | UniqueResourceCollection::new(ctx.local_key, ctx.id, &Default::default()) |
| 154 | .take_into_arc() |
| 155 | ), |
| 156 | self.broker.run() |
| 157 | )?; |
| 158 | crate::registry::finalize(local_key); |
| 159 | Ok(()) |
| 160 | }) |
| 161 | } |
| 162 | } |
| 163 | |
| 164 | fn graph_register(local_key: u64, ty: &str, port_name: &str) { |