Commit d16bbc90 authored by Committed by Robin Obůrka
msgloop: Don't use generator for in-out boxes - refactor to closures
I found that any exception raised from generator ends with StopIteration at next next() call. So, the solution wasn't able to provide bulletproof solution for unexpected errors. This solution uses some other nice-to-look-at shortcut to not duplicate code that is based on closures. I'm able to protect in-out boxes against unexpected errors. I'm not able to do the same for out-only boxes based on generators, but it is better than nothing. Boxes generating messages should know what they are doing, so they shouldn't need so much effort.
Showing with 15 additions and 7 deletions