Open wasker opened 11 months ago
Tagging subscribers to this area: @mangod9 See info in area-owners.md if you want to be subscribed.
Author: | wasker |
---|---|
Assignees: | - |
Labels: | `area-System.Threading`, `untriaged` |
Milestone: | - |
The cached instances don't do anything on dispose so it's not really an issue if they get disposed multiple times. Are you seeing an issue?
This issue has been marked needs-author-action
and may be missing some important information.
Description
It seems that ConcurrencyLimiter.AttemptAcquireCore and ConcurrencyLimiter.AcquireAsyncCore return cached instances of SuccessfulLease, FailedLease, and QueueLimitLease.
If the pattern of usage is
then all those cached instances will be disposed at some point.
Is this expected?
Reproduction Steps
Run
in the concurrent scenario and observe that SuccessfulLease / FailedLease are being disposed multiple times.
Expected behavior
Not dispose instances that were disposed earlier.
Actual behavior
Same instances are being disposed multiple times.
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response