Commit fd7b21ed56b9dcfa9082bdcf95ad382f2916f0e3

ckolivas 2012-07-02T10:54:20

Use a pthread conditional that is broadcast whenever work restarts are required. Create a generic wait function waiting a specified time on that conditional that returns if the condition is met or a specified time passed to it has elapsed. Use this to do smarter polling in bitforce to abort work, queue more work, and check for results to minimise time spent working needlessly.