Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Simplify AtomicCell LOCKS #722

Merged
merged 3 commits into from Jul 25, 2021
Merged

Conversation

Daniel-Bloom-dfinity
Copy link
Contributor

No description provided.

@taiki-e
Copy link
Member

taiki-e commented Jul 25, 2021

I would prefer to use a way that does not add dependencies. We can write as follows:

const L: SeqLock = SeqLock::INIT;
static LOCKS: [SeqLock; LEN] = [
L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L,
L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L,
L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L,
L, L, L, L, L, L, L,
];

Copy link
Member

@taiki-e taiki-e left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

bors r+

@taiki-e taiki-e changed the title Use array-macro to simplify AtomicCell LOCKS Simplify AtomicCell LOCKS Jul 25, 2021
@bors
Copy link
Contributor

bors bot commented Jul 25, 2021

Build succeeded:

@bors bors bot merged commit 2653a6c into crossbeam-rs:master Jul 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

2 participants