Skip to content

Commit

Permalink
skip exchange on equal
Browse files Browse the repository at this point in the history
Signed-off-by: Ping Yu <[email protected]>
  • Loading branch information
pingyu committed Oct 31, 2023
1 parent fdec181 commit a1afcc1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/transaction/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -988,6 +988,9 @@ impl<Cod: Codec, PdC: PdClient<Codec = Cod>> Transaction<Cod, PdC> {
{
let mut current = self.get_status();
while check_status(current) {
if current == next {
return true;
}
match self.status.compare_exchange_weak(
current as u8,
next as u8,
Expand Down

0 comments on commit a1afcc1

Please sign in to comment.