gval icon indicating copy to clipboard operation
gval copied to clipboard

functions inside expression are evaluated in coroutine and on panic are not recovered thus crashing whole application

Open aldas opened this issue 2 years ago • 0 comments

functions inside expressions are evaluated in coroutine and on panic are not recovered thus crashing whole application. I think there should be somekind of recover as when coroutine ends with not recovered panic the whole application gets shutdown by go runtime.

https://github.com/PaesslerAG/gval/blob/12d4df2a647a3a5cf5be4fc40872f64d01e36f76/functions.go#L16 and https://github.com/PaesslerAG/gval/blob/12d4df2a647a3a5cf5be4fc40872f64d01e36f76/functions.go#L39

note: why it is done in coroutine? from timeout or context cancellation perspective this makes little sense because if there is endless loop returning from expression that "timeouted" makes little difference because that endless coroutine still works on background.

aldas avatar Mar 09 '22 07:03 aldas