task: add task::id() and task::try_id() (#5171)

This commit is contained in:
Abutalib Aghayev
2022-11-13 14:18:42 +01:00
committed by GitHub
parent 582d512907
commit 71bd49e146
10 changed files with 396 additions and 16 deletions
+1 -4
View File
@@ -363,10 +363,7 @@ where
fn insert(&mut self, key: K, abort: AbortHandle) {
let hash = self.hash(&key);
let id = abort.id();
let map_key = Key {
id: id.clone(),
key,
};
let map_key = Key { id, key };
// Insert the new key into the map of tasks by keys.
let entry = self