Quantcast
Channel: roslyn Source Code Rss Feed
Viewing all articles
Browse latest Browse all 70

Source code checked in, #1345b768aa165e2b64cbdf017fe28f6be0320ef4

$
0
0
Fixes in AnalyzerDriver This fixes a couple of minor issues with AnalyzerDriver. 1. The compilation process was always shutting down with two first chance exceptions. The code would unconditionally loop an await DequeueAsync calls which results in a TaskCanceledException when the CompilationEventQueue is completed. That exception was then rethrown to the calling method. This is not wrong but it significantly hinders the debugging experience in Visual Studio (exceptions result in dialogs + pauses). And the second throw essentially amounts to using exceptions as control flow. I changed the code to stop looping when there was no potential for future data from the CompilationEventQueue. If the queue is completed and has zero entries then no more data will ever be added and calling DequeueAsync is wasted processing. This is the normal shut down sequence for the compiler. 2. The exception handling code covered two methods: DequeueAsync and ProcessEventAsync. It assumed that TaskCanceledException always came from DequeueAsync. If ProcessEventAsync ever threw a TaskCanceledException the event loop logic would be incorrect. Changed the handling to be separate for each call. ***NO_CI*** (changeset 1390329)

Viewing all articles
Browse latest Browse all 70

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>