Closed rafrombrc closed 11 years ago
thanks @rafrombrc I completely missed this pull request, sorry for the delay...
overall changes look good other than those few nitpicks
Yup, good spots. Made the requested changes.
cool, thanks. do you mind squashing this down to one commit?
errr, maybe 3:
?
Commits squashed. First time I've used "git rebase -i"... surprisingly easy!
This patch makes 4 changes:
PostTimeout
function that lets you tell go-notify to time out after a specific time duration for output channels that are blocking.StopAll
function that lets you unregister all channels listening for a given event.E_NOT_FOUND
error string to a constant so the output string is only specified in a single location.outChans
variable that is used to store the results ofevents[event]
, so the map lookup doesn't have to happen multiple times unnecessarily.The
PostTimeout
andStopAll
functions are both particularly useful from within test code, when you might be exercising code that sets up event listeners that are otherwise beyond control of the tests themselves.