mirror of
https://github.com/embassy-rs/embassy.git
synced 2025-10-01 14:20:33 +00:00
embassy-executor: introduce Executor::id()
This commit is contained in:
parent
61b7762421
commit
3f87ce6f50
@ -555,6 +555,11 @@ impl Executor {
|
|||||||
pub fn spawner(&'static self) -> super::Spawner {
|
pub fn spawner(&'static self) -> super::Spawner {
|
||||||
super::Spawner::new(self)
|
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`.
|
/// Wake a task by `TaskRef`.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user