You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we click ctrl+c we terminate the neva process without handling it. What we probably should do is to close the context to make sure func-runner is gracefully terminated. It's possible to imagine a situation where some component (e.g. http get) opens a connection and never frees it after ctrl+c (or other termination signals from the OS)
Question is, shouldn't user do these kind of things manually? Why e.g. Go doesn't handle resource freeing automatically?
In C# there are the concept of state in CancellationToken object, which holds both the result of any async operation or state of async function call. It is the obligatory of a programmer to check and to free resources in case of CancellationToken would contains cancellation event state, so that instructs programmer to interrupt code and do whatever it takes to bypass any functions long polling or execution and finish immediately without possible exception handling, it works like a charm in case you do not rely on exception handling and use old good messaging system which will keep working without making mad decisions with raising and handling errors in many places. In general exception raising and handing makes code less readable and less debuggable in my honest opinion.
When we click ctrl+c we terminate the neva process without handling it. What we probably should do is to close the context to make sure func-runner is gracefully terminated. It's possible to imagine a situation where some component (e.g. http get) opens a connection and never frees it after ctrl+c (or other termination signals from the OS)
Question is, shouldn't user do these kind of things manually? Why e.g. Go doesn't handle resource freeing automatically?
That reminds me of cancellation token in C#, definetely. And it looks like right approach but it needs to be widely supported alongside all base class libraries or replaced with syntaxical sugar so that tons of repeatetive code would goes away from the programmer's view
When we click
ctrl+c
we terminate the neva process without handling it. What we probably should do is to close the context to make sure func-runner is gracefully terminated. It's possible to imagine a situation where some component (e.g. http get) opens a connection and never frees it after ctrl+c (or other termination signals from the OS)Question is, shouldn't user do these kind of things manually? Why e.g. Go doesn't handle resource freeing automatically?
Might be related to #668 and #811
The text was updated successfully, but these errors were encountered: