Update Processor.Shutdown to meet with the latest spec#1282
Update Processor.Shutdown to meet with the latest spec#1282cijothomas merged 2 commits intomasterfrom
Conversation
| try | ||
| { | ||
| this.OnShutdown(timeoutMilliseconds); | ||
| return true; // TODO: update exporter.OnShutdown to return boolean |
There was a problem hiding this comment.
Put this return true to the end of this function (right before })?
There was a problem hiding this comment.
The way I look at try { return } catch() { return } is similar to if() { return } else { return }. Do you see some benefit of putting it outside?
There was a problem hiding this comment.
I thought normal execution flow would end at }, besides that, I don't see any advantage to move return true to the end of the function.
Codecov Report
@@ Coverage Diff @@
## master #1282 +/- ##
==========================================
- Coverage 79.13% 79.10% -0.03%
==========================================
Files 215 215
Lines 6174 6170 -4
==========================================
- Hits 4886 4881 -5
- Misses 1288 1289 +1
|
|
Interesting! What is user to do if shutdown comes back false? |
I guess 99% users won't consume the return value. One real world scenario: one can check the |
The latest spec requires the processor
Shutdownto provide a way to indicate whether it succeeded or not.Changes
ActivityProcessor.Shutdownto return bool.For significant contributions please make sure you have completed the following items:
CHANGELOG.mdupdated for non-trivial changes