phmonte / Buildalyzer

A utility to perform design-time builds of .NET projects without having to think too hard about it.
MIT License
589 stars 92 forks source link

Fix hang if build does not start #272

Closed slang25 closed 1 month ago

slang25 commented 1 month ago

Fixes #271

There are other solutions to this, like running ReadAll in a Thread or Task and aborting that. I've also looked at the cancellation token and using that, however it's not being used effectively in ReadAll and I don't think there is simple solution as AnonymousPipeLoggerServer doesn't support cooperative cancellation as far as I can see.

There may be a memory leak here with the the two events being subscribed to, not sure if we want to try and engineer a better solution.

phmonte commented 1 month ago

Thanks for the contribution @slang25 .