1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-02-05 11:34:16 +00:00

Only roll enough work to have one staged work for each mining thread.

This commit is contained in:
Con Kolivas 2012-06-24 18:44:09 +10:00
parent 0c970bbd1c
commit 359635a8cf

View File

@ -3636,10 +3636,9 @@ static struct work *clone_work(struct work *work)
{
struct work *work_clone;
bool cloned = false;
int rolled = 0;
work_clone = make_clone(work);
while (rolled++ < mining_threads && can_roll(work) && should_roll(work)) {
while (requests_staged() < mining_threads && can_roll(work) && should_roll(work)) {
applog(LOG_DEBUG, "Pushing rolled converted work to stage thread");
if (unlikely(!stage_work(work_clone))) {
cloned = false;