3 ms·
longjmp will not interrupt third party code (well maybe if it uses callbacks and you use it from a callback). setjmp/longjmp will almost certainly require trac
by megous 7y ago
longjmp will not interrupt third party code (well maybe if it uses callbacks and you use it from a callback).
setjmp/longjmp will almost certainly require tracking any resource use carefully so that resources can be released at the setjmp point, when execution gets back there.
I mostly use it for terminating the recursive descent parsing on error. Otherwise it gets tedious to check return values everywhere in hand written code.
- deleted 7y ago[deleted]