mirror of
https://github.com/fafhrd91/actix-net
synced 2025-06-28 02:59:01 +02:00
add track_caller atrtibute to spawn calls (#454)
* add track_caller attribute to spawn calls * fix ci
This commit is contained in:
@ -53,6 +53,7 @@ impl Runtime {
|
||||
/// # Panics
|
||||
/// This function panics if the spawn fails. Failure occurs if the executor is currently at
|
||||
/// capacity and is unable to spawn a new future.
|
||||
#[track_caller]
|
||||
pub fn spawn<F>(&self, future: F) -> JoinHandle<F::Output>
|
||||
where
|
||||
F: Future + 'static,
|
||||
@ -73,6 +74,7 @@ impl Runtime {
|
||||
///
|
||||
/// The caller is responsible for ensuring that other spawned futures complete execution by
|
||||
/// calling `block_on` or `run`.
|
||||
#[track_caller]
|
||||
pub fn block_on<F>(&self, f: F) -> F::Output
|
||||
where
|
||||
F: Future,
|
||||
|
Reference in New Issue
Block a user