镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Third threading rule could be more clear about use of JoinAsync #697

Closed

Description

@sharwell

Related to:
https://github.com/microsoft/vs-threading/blob/master/doc/threading_rules.md#rule-3-if-ever-awaiting-work-that-was-started-earlier-that-work-must-be-joined

The documentation for Rule #3 is not clear regarding the use of JoinAsync in asynchronous methods. There is brief mention of await longRunningWork, but there is no explanation that this is equivalent to using JoinAsync(CancellationToken.None). I would suggest documenting it as JoinAsync(cancellationToken), followed by a note saying that a shorter form is available if the cancellation token is not required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions