foam-framework/foam

Get rid of UNSUBSCRIBE_EXCEPTION

adamvy-google opened this issue · 3 comments

Use some programatic means of unsubscribing.

Pass subscription or subscription destructor as extra argument to listeners so that they can easily unsubscribe without throwing an Exception. Will avoid the use of non-error Exceptions and will be faster because try/catch blocks disable V8 JIT.

Isn't it only finally that destroys optimizations? In any case, we should do this.