Closed hahn-kev closed 7 months ago
4 files ± 0 412 suites +8 2h 45m 48s :stopwatch: +44s 881 tests + 5 858 :heavy_check_mark: + 5 23 :zzz: ±0 0 :x: ±0 4 032 runs +36 3 898 :heavy_check_mark: +36 134 :zzz: ±0 0 :x: ±0
Results for commit 23507913. ± Comparison against base commit 04e1e281.
:recycle: This comment has been updated with latest results.
src/ChorusHub/Advertiser.cs
line 72 at r2 (raw file):
} if (_cancellationTokenSource.Token.IsCancellationRequested && cancelled)
Would all conditions that cause a ThreadAbortException also set IsCancellationRequested on the token? Or will it not matter under those circumstances?
src/ChorusHub/Advertiser.cs
line 72 at r2 (raw file):
Would all conditions that cause a ThreadAbortException also set IsCancellationRequested on the token? Or will it not matter under those circumstances?
in theory there won't be anymore ThreadAbortExceptions, but if there was then IsCancellationRequested would probably be false. So this should probably be ||
src/ChorusHub/Advertiser.cs
line 72 at r2 (raw file):
in theory there won't be anymore ThreadAbortExceptions, but if there was then IsCancellationRequested would probably be false. So this should probably be ||
on the other hand, should we just always close the client? It seems like it should always have been closed and maybe it was just a mistake that it wasn't?
src/ChorusHub/Advertiser.cs
line 72 at r2 (raw file):
on the other hand, should we just always close the client? It seems like it should always have been closed and maybe it was just a mistake that it wasn't?
I was thinking it should probably be an || for safety, or just remove the ThreadAbortException if it could only have been triggered by our code. It looks like the client was only closed on Stop via the Abort before and stop is called in the Dispose method.
src/ChorusHub/Advertiser.cs
line 72 at r2 (raw file):
I was thinking it should probably be an || for safety, or just remove the ThreadAbortException if it could only have been triggered by our code. It looks like the client was only closed on Stop via the Abort before and stop is called in the Dispose method.
alright, I just removed all this and I'm now closing and disposing of the client in Stop. If this class is going to be reused then start needs to be called again, so stop is the logical place to cleanup the client.
closes #335
while writing my tests I discovered that HgProcessOutputReader throws exceptions if redirects are not setup, so I added a comment about that and removed all the code designed to support optional redirects.
I also had to change the ThreadState checks as the threads go to sleep now while waiting to read from the stream, from what I can tell in my tests this new version works all the same.
There were 2 process streams, one was unused so I removed it.
This change is