jdantonio/concurrent-ruby — pull request #53 by jdantonio (2014-04-12 16:04:27+00:00)
Title: Extracted into Executor and JavaExecutor mixin modules

The various executors shared much common behavior but not much common code. This PR addresses that by creating two common mixin modules, common post behavior, and a common shutdown lifecycle. This is what the `Runnable` and `Stoppable` modules were originally intended to do, but this refactor is the result of emergent design.

* Created common `Executor` and `JavaExecutor` mixin modules
* Implemented several common methods into the new modules
* `post` with variants
* methods for stopping execution
* predicate methods for reflecting start/stop state
* lifecycle callbacks
* initialization and exit hooks (platform-specific)

Several classes were refactored to use the new mixins including:

* JavaThreadPoolExecutor
* RubyThreadPoolExecutor
* JavaSingleThreadExecutor
* RubySingleThreadExecutor
* TimerSet

No changed were made to any tests, thus ensuring the original behavior remained unchanged.