Skip to content

Use AtomicU32 in RouteId - #616

Merged
davidpdrsn merged 3 commits into
tokio-rs:mainfrom
SabrinaJewson:atomicu32-route-id
Dec 12, 2021
Merged

Use AtomicU32 in RouteId#616
davidpdrsn merged 3 commits into
tokio-rs:mainfrom
SabrinaJewson:atomicu32-route-id

Conversation

@SabrinaJewson

Copy link
Copy Markdown
Contributor

I don't think anyone is going to be creating >u32::MAX routes anyway so it should be fine, but I added a panic branch just in case, so silent bugs are never introduced. Also, there's no need to use SeqCst, it's not like there are any data dependencies associated with that atomic so Relaxed will do.

Fixes: #596.

@davidpdrsn
davidpdrsn enabled auto-merge (squash) December 12, 2021 14:09
@davidpdrsn

Copy link
Copy Markdown
Member

Thanks!

@davidpdrsn
davidpdrsn merged commit 9ed18d9 into tokio-rs:main Dec 12, 2021
@SabrinaJewson
SabrinaJewson deleted the atomicu32-route-id branch December 12, 2021 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Library not compiling for armv5te because of missing AtomicU64

2 participants