1
0
mirror of https://github.com/fafhrd91/actix-net synced 2025-09-02 14:16:37 +02:00

add track_caller atrtibute to spawn calls (#454)

* add track_caller attribute to spawn calls

* fix ci
This commit is contained in:
Rob Ede
2022-04-25 21:05:48 +01:00
committed by GitHub
parent dc67ba770d
commit 4c1e581a54
6 changed files with 20 additions and 4 deletions

View File

@@ -260,6 +260,7 @@ impl Arbiter {
/// If you require a result, include a response channel in the future.
///
/// Returns true if future was sent successfully and false if the Arbiter has died.
#[track_caller]
pub fn spawn<Fut>(&self, future: Fut) -> bool
where
Fut: Future<Output = ()> + Send + 'static,
@@ -275,6 +276,7 @@ impl Arbiter {
/// channel in the function.
///
/// Returns true if function was sent successfully and false if the Arbiter has died.
#[track_caller]
pub fn spawn_fn<F>(&self, f: F) -> bool
where
F: FnOnce() + Send + 'static,