Skip to content

Add note on Float64.CAS matching of NaN#95

Merged
prashantv merged 1 commit into
masterfrom
float-cas
Jun 11, 2021
Merged

Add note on Float64.CAS matching of NaN#95
prashantv merged 1 commit into
masterfrom
float-cas

Conversation

@prashantv

Copy link
Copy Markdown
Collaborator

NaN != NaN when using Go's inbuilt operator, but the same is not true
when used with Float64.CAS. Add a note calling this out.

Changing this would be a behaviour change (requires a major version
bump), and is likely unsafe as it could lead to typical CAS loops
blocking forever.

To add the note, we copy the generated CAS method and extend the
documentation as the generator does not support per-method
customizations on the doc comments.

Thanks to @masiulaniec for calling this out and referencing golang/go#21996 (comment)

NaN != NaN when using Go's inbuilt operator, but the same is not true
when used with Float64.CAS. Add a note calling this out.

Changing this would be a behaviour change (requires a major version
bump), and is likely unsafe as it could lead to typical CAS loops
blocking forever.

To add the note, we copy the generated CAS method and extend the
documentation as the generator does not support per-method
customizations on the doc comments.
@prashantv prashantv requested a review from abhinav June 10, 2021 22:53
@codecov

codecov Bot commented Jun 10, 2021

Copy link
Copy Markdown

Codecov Report

Merging #95 (a8ffd06) into master (0c8e1ec) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #95   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           16        16           
  Lines          170       170           
=========================================
  Hits           170       170           
Impacted Files Coverage Δ
float64.go 100.00% <ø> (ø)
float64_ext.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0c8e1ec...a8ffd06. Read the comment docs.

@masiulaniec

Copy link
Copy Markdown

LGTM

@prashantv prashantv merged commit 38b6e7f into master Jun 11, 2021
@prashantv prashantv deleted the float-cas branch June 11, 2021 15:16
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.

3 participants