Skip to content

Commit 86a10de

Browse files
authored
feat(server): add SegmentedSlab collection (apache#2549)
Add a concurrent segmented slab with structural sharing, designed for Read-Copy-Update patterns with lock-free reads and copy-on-write modifications.
1 parent 8a0df74 commit 86a10de

File tree

5 files changed

+527
-0
lines changed

5 files changed

+527
-0
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/common/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ rustls = { workspace = true }
6363
serde = { workspace = true }
6464
serde_json = { workspace = true }
6565
serde_with = { workspace = true, features = ["base64"] }
66+
slab = "0.4.11"
6667
strum = { workspace = true }
6768
thiserror = { workspace = true }
6869
tokio = { workspace = true }

core/common/src/collections/mod.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Licensed to the Apache Software Foundation (ASF) under one
2+
// or more contributor license agreements. See the NOTICE file
3+
// distributed with this work for additional information
4+
// regarding copyright ownership. The ASF licenses this file
5+
// to you under the Apache License, Version 2.0 (the
6+
// "License"); you may not use this file except in compliance
7+
// with the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing,
12+
// software distributed under the License is distributed on an
13+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
// KIND, either express or implied. See the License for the
15+
// specific language governing permissions and limitations
16+
// under the License.
17+
18+
mod segmented_slab;
19+
20+
pub use segmented_slab::SegmentedSlab;

0 commit comments

Comments
 (0)