Stop the runtime
(&self)
| 56 | |
| 57 | /// Stop the runtime |
| 58 | pub async fn stop(&self) { |
| 59 | if self |
| 60 | .running |
| 61 | .compare_exchange(true, false, Ordering::SeqCst, Ordering::SeqCst) |
| 62 | .is_ok() |
| 63 | { |
| 64 | self.scheduler.stop().await; |
| 65 | tracing::info!("Runtime stopped"); |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | /// Spawn a new agent |
| 70 | pub async fn spawn<T, F, Fut>(&self, behavior: F) -> AgentRef<T> |
no outgoing calls