backport emitter from beeker and other projects
0.8.0