mirror of
https://github.com/YosysHQ/yosys
synced 2026-04-14 16:25:12 +00:00
Avoid racing accesses to shards[0] in ShardedHashtable parallel destruction
This commit is contained in:
parent
a96cf8cc2b
commit
1f6559a5cf
1 changed files with 1 additions and 1 deletions
|
|
@ -567,7 +567,7 @@ public:
|
|||
// Call this for each shard to implement parallel destruction. For very large `ShardedHashtable`s,
|
||||
// deleting all elements of all shards on a single thread can be a performance bottleneck.
|
||||
void clear(const ThreadIndex &shard) {
|
||||
AccumulatedValueEquality equality = shards[0].key_eq();
|
||||
AccumulatedValueEquality equality = shards[shard.thread_num].key_eq();
|
||||
shards[shard.thread_num] = Shard(0, AccumulatedValueHashOp(), equality);
|
||||
}
|
||||
private:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue