briandunn / flatware

A parallel test runner for RSpec and Cucumber with pretty output
MIT License
275 stars 35 forks source link

Refactor Poller class #8

Closed derekparker closed 11 years ago

derekparker commented 11 years ago

A small refactoring of the Poller class.

I split up the #each method by taking the poll = ZMQ::Poller.new assignment and moving it into a memoized method, and I also moved the for socket in sockets loop into a method that is called on initialize.

This has the benefit of not having to new up a ZMQ::Poller object and register all sockets any time #each is called on the Flatware Poller class.

briandunn commented 11 years ago

This was pretty much manually merged. thanks D!