Commit 830f30ff2d461bbefd31d460c93e5c1a8efd42da

Con Kolivas 2013-05-18T16:56:23

Only allow the mining thread to be cancelled when it is not within driver code, making for cleaner shutdown and allowing us to pthread_join the miner threads on kill_work().