tmp = tmp+1;
Thread::sleep(1000);
_value = tmp;
- _m.unlock();
+ _m.unLock();
Thread::sleep(100000);
}
return 0;
}
_resources -= amount;
_ownedResources[id] = amount;
- _m.unlock();
+ _m.unLock();
}
void BasesTest::free_resources(int id, int amount)
_waiting = 0;
_cond.notify_all();
}
- _m.unlock();
+ _m.unLock();
}
int BasesTest::count_resources()
{
totOwned += _ownedResources[i];
}
- _m.unlock();
+ _m.unLock();
}
int total = resources + totOwned;
DEBTRACE("resources:: owned by threads: " << totOwned << " remaining: " << resources << " total: " << total);