diff --git a/Cargo.lock b/Cargo.lock index 08fb42c..b45c974 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -255,7 +255,7 @@ checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" [[package]] name = "speare" -version = "0.1.2" +version = "0.1.3" dependencies = [ "async-trait", "derive_more", diff --git a/core/Cargo.toml b/core/Cargo.toml index ec6e57c..23c0313 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "speare" -version = "0.1.2" +version = "0.1.3" edition = "2021" license = "MIT" description = "actor-like thin abstraction over tokio::task and flume channels" diff --git a/core/src/lib.rs b/core/src/lib.rs index 797c2bd..5b727a4 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -528,6 +528,11 @@ where &self.handle } + /// Clears all the messages from the mailbox. + pub fn clear_mailbox(&self) { + self.msg_rx.drain(); + } + /// Spawns and supervises a child `Process`. /// ## Examples ///