Migrate from `AtomicUsize::compare_and_swap` to `AtomicUsize::compare_exchange`

Open Beginner friendly
#71 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
63/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Stale
Tech stack
rust
Domain
backend

Research direction

Search the codebase for AtomicUsize::compare_and_swap and inspect each call site before migrating it to compare_exchange. Run the project's checks and confirm the deprecation warning is gone without changing the timer behavior.

Written by the indexing model from the issue text.

Description

Right now we have a warning in the codebase about the deprecated compare_and_swap call. We should migrate this to the newer compare_exchange call. I've turned off warnings == errors in https://github.com/async-rs/futures-timer/pull/69

Dominant language
Rust
Stars
219
Forks
42
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from async-rs/futures-timer

All issues in async-rs/futures-timer

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.