redding/dat-worker-pool — pull request #7 by jcredding (2013-08-22 14:40:43+00:00)
Title: Rework `Worker` to use callbacks

This reworks the `Worker` to use callbacks, which reduces the
coupling of the worker with a pool. This changes `Worker` to
provide callbacks, when it's waiting, when it's done waiting and
when it's shutdown. This properly organizes the logic done
during these events in the pool and also removes the silly
public `despawn_worker` method. This "breaks" backwards
compatibility, but that method being public was never a good
implementation. This also beefs up the workers tests to
ensure it's behaving as expected.