✅ Cancel stream read
I'm running a Task that constantly reads some data off a (named pipe) stream when it's present.
the
The issue is that the read operation on the stream is infinitely blocking, so I'm never sure if my Task will end properly
Can I stop a blocking stream read operation from another thread in some way?
the
_shouldRun indicates whether the task should continue, I set this to false when it needs to stopThe issue is that the read operation on the stream is infinitely blocking, so I'm never sure if my Task will end properly
Can I stop a blocking stream read operation from another thread in some way?