I just banged my head against the keyboard for a while figuring out why a read operation of our language server is never canceled. Turns out that the "ctx" of "stream.Read" does nothing. One cannot cancel that read operation.
I was wondering why it is implemented like that?
I want to achieve the following:
- Read as long there is data, or a timeout
- If the timeout occurs stop reading
I just banged my head against the keyboard for a while figuring out why a read operation of our language server is never canceled. Turns out that the "ctx" of "stream.Read" does nothing. One cannot cancel that read operation.
I was wondering why it is implemented like that?
I want to achieve the following: