Skip to content

Commit fb6c183

Browse files
committed
Improve docs
1 parent f3dd75e commit fb6c183

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/lib.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ Or, you can spawn a task onto a global executor via dynamic dispatch. You can p
2020
can be used by the executor to prioritize tasks. You can do all this in a modular and futureproof way.
2121
2222
Oh, and we built an executor into the crate. It's not the greatest, but it is a baseline that's always available.
23+
These builtin executors print warnings when used to alert you they're not production-quality. If you want them to panic instead
24+
(useful for catching missing executor configuration during development), set the environment variable `SOME_EXECUTOR_BUILTIN_SHOULD_PANIC=1`.
2325
2426
**If you want to implement an executor**, this crate provides a simple, obvious trait to receive futures
2527
and execute them, and plug into the ecosystem. Moreover, advanced features like cancellation are
@@ -116,6 +118,13 @@ mod sys;
116118
pub mod task;
117119
pub mod thread_executor;
118120

121+
/// Platform-appropriate instant type for time measurements.
122+
///
123+
/// This is a re-export of either `std::time::Instant` (on native platforms) or
124+
/// `web_time::Instant` (on wasm32), providing a unified interface for time-related
125+
/// operations across all supported platforms.
126+
///
127+
/// Use this type for task scheduling and timing operations within the executor framework.
119128
pub use sys::Instant;
120129

121130
/// Task priority for scheduling hints.

0 commit comments

Comments
 (0)