embassy_executor: introduce Spawner::executor_id()
This commit is contained in:
parent
3f87ce6f50
commit
89f3566419
@ -173,6 +173,11 @@ impl Spawner {
|
|||||||
pub fn make_send(&self) -> SendSpawner {
|
pub fn make_send(&self) -> SendSpawner {
|
||||||
SendSpawner::new(&self.executor.inner)
|
SendSpawner::new(&self.executor.inner)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Return the unique ID of this Spawner's Executor.
|
||||||
|
pub fn executor_id(&self) -> usize {
|
||||||
|
self.executor.id()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Handle to spawn tasks into an executor from any thread.
|
/// Handle to spawn tasks into an executor from any thread.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user