mirror of
https://github.com/embassy-rs/embassy.git
synced 2025-09-30 05:40:55 +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 {
|
||||
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`.
|
||||
|
Loading…
x
Reference in New Issue
Block a user