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

Some suggestions for documentation #114

Open
6 tasks
akrzemi1 opened this issue Sep 16, 2023 · 0 comments
Open
6 tasks

Some suggestions for documentation #114

akrzemi1 opened this issue Sep 16, 2023 · 0 comments

Comments

@akrzemi1
Copy link
Member

  • The initial description of promise says:
    "Promises can also be used to spawn tasks easily."

    Could the docs illustrate what this means?

  • When we are first exposed, in overview, to promises, we read:
    "Promises are by default attached. This means, that a cancellation is sent when the promise handles goes out of scope."
    Maybe this concept of being "attached" could be described in more detail in the Design seciton?
    Does "attached"/"detached" property only apply promise? Word "attached" requires an object. I suppose, a promise is attached to a coroutine.

  • Docs for generator::get() say:
    "// Get the return value. Throws if not ready."

    1. "not ready" imprecise. I think you should define a term "has a ready value", define it for generator and then use the term to define bth get() and ready().
    2. It says it throw, but it doesn't say what the type and the properties of the exception are.
    3. Why does it throw rathe than being UB? The policy for signlling logic errors should be described in the Design section.
  • Docs for task say:
    "Unlike a promise, a task can be awaited or spawned on another executor than it was created on."
    Again, we don't know what this spannig is.

  • The Outline for task implies it cannot be canceled. Is this true?

  • Docs for detached say:
    "Promises are mainly used to spawn tasks easily."
    Change "Promises are" to "detached is".

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

No branches or pull requests

1 participant