redding/dat-worker-pool — pull request #15 by jcredding (2014-11-20 22:15:36+00:00)
Title: Add callbacks for workers and the queue

This adds the ability to configure callbacks on a worker pool for
its workers and queue. This allows tools using worker pool to
trigger logic when workers go to sleep or wakeup and when work is
added or removed from the queue. This is needed for `Qs` to only
fetch work when a worker is available and to also allow it to wait
for the worker pool's queue to empty. It will use the callbacks
to wake up its thread, when a worker is waiting or when pop is
called on the queue.

@kellyredding - Ready for review. I've tested this with `Qs` and its providing the functionality needed. I also tested it with `DatTCP` and made sure it didn't break it or hurt its performance.