mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-13 19:44:28 +00:00
common taskScheduler: fix wrong thread indexing due to duplicated variable names.
That mistake could invoke inproper threads....
This commit is contained in:
parent
ae5673658e
commit
9873539b04
1 changed files with 2 additions and 2 deletions
|
@ -127,8 +127,8 @@ public:
|
|||
//Thread Loop
|
||||
while (true) {
|
||||
auto success = false;
|
||||
for (unsigned i = 0; i < threadCnt * 2; ++i) {
|
||||
if (taskQueues[(i + i) % threadCnt].tryPop(&task)) {
|
||||
for (unsigned x = 0; x < threadCnt * 2; ++x) {
|
||||
if (taskQueues[(i + x) % threadCnt].tryPop(&task)) {
|
||||
success = true;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue