embassy_executor: introduce Spawner::executor_id()

This commit is contained in:
Kaspar Schleiser 2024-01-22 21:50:34 +01:00
parent 3f87ce6f50
commit 89f3566419

View File

@ -173,6 +173,11 @@ impl Spawner {
pub fn make_send(&self) -> SendSpawner {
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.