microsoft / microsoft/vs-threading

Do AsyncSemaphore awaiters get called even after disposal?

Open
#592 0 comments 0 reactions 1 assignee View on GitHub

@AArnott is already working on this.

Since Feb 21, 2020.

bug
Dominant language
C#
Stars
1k
Forks
160
Avg merge
1d 12h
Merged PRs (30d)
28

Description

When more than one async method are waiting for an AsyncSemaphore, and that instance gets disposed, from reading the code it appears only the first waiter will get an ObjectDisposedException thrown at them, and the rest of the items in the queue will never get invoked because that entry into the SemaphoreSlim never gets released.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.