mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-15 12:34:30 +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
|
//Thread Loop
|
||||||
while (true) {
|
while (true) {
|
||||||
auto success = false;
|
auto success = false;
|
||||||
for (unsigned i = 0; i < threadCnt * 2; ++i) {
|
for (unsigned x = 0; x < threadCnt * 2; ++x) {
|
||||||
if (taskQueues[(i + i) % threadCnt].tryPop(&task)) {
|
if (taskQueues[(i + x) % threadCnt].tryPop(&task)) {
|
||||||
success = true;
|
success = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue