troopjs/troopjs-core — pull request #126 by garryyao (2014-01-14 14:07:58+00:00)
Title: Refactoring event emitter

This PR is to change the default event emitter pipelined behavior into a way that different runners could be specified when emitting the event, to executing the handlers in different strategies depending on the scenario.

Rewrite the **signal** handling internally, using a sequenced event emitting, with each declared signal functions as event handlers.

Keep the **hub** subscription/publishing behavior to be using the pipelined event emitting, this's for backward compatibility concern.

New tests are added and existing tests are slightly justified to survive with the new code.