Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify documentation of Lazy wrt. RacyLazy and Undefined exceptions #713

Merged
merged 1 commit into from Oct 23, 2021

Conversation

gadmm
Copy link
Contributor

@gadmm gadmm commented Oct 22, 2021

@kayceesrk Following discussion at #520. From the commit log:


  • Remove ambiguous thread-safety claim
  • Clarify raising behaviour of try_force
  • Clarify unsafety before 5.0

With this clarification done, the asymmetry of try_force regarding race conditions appears clearly. I can also look into returning a value in every case and never raise if that's obviously better. (But as mentioned in the discussion above, it will not help the use-case I had in mind.)

- Remove ambiguous thread-safety claim

- Clarify raising behaviour of try_force

- Clarify unsafety before 5.0

(Related to discussion at ocaml-multicore#520)
@kayceesrk
Copy link
Contributor

kayceesrk commented Oct 23, 2021

LGTM. Thanks!

Separately, it may be useful to provide force_spin_wait which always returns a value, with "spin_wait" hopefully making the semantics clear?

@kayceesrk kayceesrk merged commit 557f72a into ocaml-multicore:5.00 Oct 23, 2021
sadiqj pushed a commit to sadiqj/ocaml that referenced this pull request Jan 10, 2022
ctk21 pushed a commit to ctk21/ocaml that referenced this pull request Jan 11, 2022
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.

None yet

2 participants