Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

resolve build errors to make project compile #1

Merged
merged 1 commit into from
Nov 24, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions syncpool/src/bucket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,13 +355,12 @@ impl<T> RingBucket<T> {
/// make sure the bitmap is updated as well.
pub(crate) fn new(filler: Option<&ElemBuilder<T>>) -> Self {
// create the placeholder
let mut slice: [AtomicPtr<T>; SLOT_CAP] =
[AtomicPtr::new(ptr::null_mut()); SLOT_CAP];
let mut slice: [AtomicPtr<T>; SLOT_CAP] = Default::default();

// fill the slots and update the bitmap
if let Some(handle) = filler {
for (_, item) in slice.iter_mut().enumerate() {
item.swap(Box::into_raw(make_elem(handle), Ordering::SeqCst);
item.swap(Box::into_raw(make_elem(handle)), Ordering::SeqCst);
}
}

Expand Down