Skip to content

Minor improvements to "named values" handling#11056

Merged
xavierleroy merged 3 commits intoocaml:trunkfrom
xavierleroy:named-values
Feb 24, 2022
Merged

Minor improvements to "named values" handling#11056
xavierleroy merged 3 commits intoocaml:trunkfrom
xavierleroy:named-values

Conversation

@xavierleroy
Copy link
Copy Markdown
Contributor

Three commits that address some of the outstanding review comments (#10861):

The function is currently unused.  But taking `named_value_lock`
during iteration feels safer.
It's the same algorithm we had before, only with better constants.
Copy link
Copy Markdown
Member

@dra27 dra27 left a comment

Choose a reason for hiding this comment

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

LGTM - otherlibs/win32unix/unixsupport.c hadn't diverged in the same way, but please could the atomic access to the cache be copied over?

Like in OCaml 4, but with atomic accesses on the cache.
@xavierleroy
Copy link
Copy Markdown
Contributor Author

Well spotted! I updated otherlibs/win32unix/unixsupport.c as well.

Copy link
Copy Markdown
Member

@dra27 dra27 left a comment

Choose a reason for hiding this comment

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

Up to you whether the tweak to the hash warrants a Changes entry - it's pretty internal (and the manual of course recommends caching caml_named_value results as well)

@xavierleroy xavierleroy merged commit d42ce97 into ocaml:trunk Feb 24, 2022
@xavierleroy xavierleroy deleted the named-values branch February 24, 2022 12:05
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.

2 participants