Swallow ObjectDisposedException#2844
Conversation
…nning after wait handles are disposed
Codecov Report
@@ Coverage Diff @@
## main #2844 +/- ##
==========================================
- Coverage 83.74% 83.73% -0.01%
==========================================
Files 251 251
Lines 8863 8866 +3
==========================================
+ Hits 7422 7424 +2
- Misses 1441 1442 +1
|
|
I think we need to discuss about the design principles, in general the telemetry SDK should "be nice to the user, after the SDK is initialized, we should not punish the user even if they did something wrong". And we have spec covering this. What's your take on the following scenario:
Next question: do you expect all the telemetry APIs (including the SDK components) that we exposed from this project to be bullet proof? e.g. even if things got disposed, member functions can still be called without exception. More readings https://dev2u.net/2021/08/20/9-common-design-patterns-framework-design-guidelines-conventions-idioms-and-patterns-for-reusable-net-libraries-3rd-edition/: AVOID allowing an object to regain meaningful state after a call to Dispose(). |
Refer to the analysis here #2831 (comment).
I think it is a very rare case that the user might have disposed the
BatchExportingProcessorwhile the exporter worker threadJoin()timed out.Here goes a self-contained repro simulating this situation: