Skip to content

Commit e8652b8

Browse files
committed
replace rayon::scope with thread::scope when store cell
1 parent 46cae23 commit e8652b8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

storage/src/store/shard_state/cell_storage.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ impl StoreContext {
510510
};
511511

512512
Ok(match self.transaction.entry(*key) {
513-
Entry::Occupied(mut value) => {
513+
Entry::Occupied(value) => {
514514
value.get().rc.fetch_add(1, Ordering::Relaxed);
515515
false
516516
}

storage/src/store/shard_state/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,13 @@ impl ShardStateStorage {
137137

138138
let ctx = cell_storage.create_store_ctx(estimated_update_size_bytes);
139139

140-
rayon::scope(|s| {
141-
s.spawn(|_| {
140+
std::thread::scope(|s| {
141+
s.spawn(|| {
142142
CellStorage::store_cell(root_cell.as_ref(), &ctx).unwrap();
143143
});
144144

145145
for (_, data_root_cell) in root_data_cells.iter() {
146-
s.spawn(|_| {
146+
s.spawn(|| {
147147
CellStorage::store_cell(data_root_cell.as_ref(), &ctx).unwrap();
148148
});
149149
}
@@ -413,9 +413,9 @@ impl ShardStateStorage {
413413
tracing::info!(len = data_roots.len(), block_id = ?cur_block_id, "data_roots");
414414

415415
let ctx = cell_storage.create_remove_ctx();
416-
rayon::scope(|s| {
416+
std::thread::scope(|s| {
417417
for data_root in data_roots.iter() {
418-
s.spawn(|_| {
418+
s.spawn(|| {
419419
ctx.remove_cell(data_root).unwrap();
420420
});
421421
}

0 commit comments

Comments
 (0)