Skip to content

Commit b18b3c1

Browse files
committed
feat(runtime): expose JoinHandle
1 parent 8429dc7 commit b18b3c1

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

compio-runtime/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ pub mod time;
2222
pub use async_task::Task;
2323
pub use attacher::*;
2424
use compio_buf::BufResult;
25-
pub use runtime::{spawn, spawn_blocking, submit, Runtime, RuntimeBuilder};
25+
pub use runtime::{spawn, spawn_blocking, submit, JoinHandle, Runtime, RuntimeBuilder};

compio-runtime/src/runtime/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ use crate::{runtime::op::OpFuture, BufResult};
3333

3434
scoped_tls::scoped_thread_local!(static CURRENT_RUNTIME: Runtime);
3535

36+
/// Type alias for `Task<Result<T, Box<dyn Any + Send>>>`, which resolves to an
37+
/// `Err` when the spawned future panicked.
3638
pub type JoinHandle<T> = Task<Result<T, Box<dyn Any + Send>>>;
3739

3840
/// The async runtime of compio. It is a thread local runtime, and cannot be

0 commit comments

Comments
 (0)