Skip to content

Make sure we mint exclusive ids#368

Closed
haesbaert wants to merge 1 commit intoocaml-multicore:mainfrom
haesbaert:ctfrace
Closed

Make sure we mint exclusive ids#368
haesbaert wants to merge 1 commit intoocaml-multicore:mainfrom
haesbaert:ctfrace

Conversation

@haesbaert
Copy link
Copy Markdown
Contributor

This preserves the same id starting as 1, as fetch_and_add returns the value pre-increment. Therefore it now expresses next_id, not last_id.

This preserves the same id starting as 1, as fetch_and_add returns the value
pre-increment. Therefore it now expresses next_id, not last_id.
@talex5
Copy link
Copy Markdown
Collaborator

talex5 commented Nov 10, 2022

Note: this will only make a difference with multiple domains, and tracing doesn't work there anyway at the moment. It might also cause a large slowdown as all domains fight over the single counter.

Perhaps this will be fixed by the larger changes in #138 (which @patricoferris is investigating).

@haesbaert
Copy link
Copy Markdown
Contributor Author

Didn't know it wasn't working for multiple domains, in that way disregard this until #138 is in shape, cause it will slow things for sure.

@talex5 talex5 marked this pull request as draft November 15, 2022 11:03
@TheLortex TheLortex mentioned this pull request Apr 4, 2023
@TheLortex
Copy link
Copy Markdown

Closing as we came up with an implementation with less contention: #480

@TheLortex TheLortex closed this Apr 5, 2023
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