embassy-executor: introduce Executor::id()

This commit is contained in:
Kaspar Schleiser 2024-01-19 11:03:00 +01:00
parent 61b7762421
commit 3f87ce6f50

View File

@ -555,6 +555,11 @@ impl Executor {
pub fn spawner(&'static self) -> super::Spawner {
super::Spawner::new(self)
}
/// Get a unique ID for this Executor.
pub fn id(&'static self) -> usize {
&self.inner as *const SyncExecutor as usize
}
}
/// Wake a task by `TaskRef`.