• Robin Obůrka's avatar
    msgloop: Don't use generator for in-out boxes - refactor to closures · d16bbc90
    Robin Obůrka authored
    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.
    d16bbc90
Name
Last commit
Last update
dev Loading commit data...
examples Loading commit data...
sn Loading commit data...
tests Loading commit data...
.gitignore Loading commit data...
MANIFEST.in Loading commit data...
README Loading commit data...
setup.py Loading commit data...