Closed mqudsi closed 3 weeks ago
Yes, specifically the Deferral completes automatically in its destructor, same as calling Close/Dispose. But note that in C# the Deferral's destruction won't happen until GC has collected it some random time in the future.
Thanks, @MikeHillberg. Note that in my sample above, the deferral is in a using
block/statement so it will be disposed immediately at the end of the scope; so if I understand you correctly, there shouldn't be anything waiting on the actual destructor/finalizer.
Thanks for submitting your feedback and we apologize for the delayed response. I see that updates have not been made since the creation of this Issue, so I went ahead and created an internal work item to engage with our engineering folks, find the answers, and resolve this doc bug. The timeline for this may vary, so I will go ahead and close this and circle back when the changes are live.
We have moved to a new feedback system, and I want to ensure that we don't lose access to the feedback in our open issues. Though the Issue will be marked as Closed, we will monitor any replies that come afterwards so treat this like an open Issue. Many thanks.
The documentation on deferrals doesn't state whether this is sufficient:
or if the
deferral.Complete()
line must be commented back in.i.e. does disposing a deferral also complete it if it hasn't yet been completed?
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.