8000 Merge pull request #3149 from DavePutz/issue2949 · adafruit/circuitpython@7f27fcd · GitHub
[go: up one dir, main page]

Skip to content

Commit 7f27fcd

Browse files
authored
Merge pull request #3149 from DavePutz/issue2949
Issue#2949 Put in a check to prevent USB starvation by long calculations
2 parents 12edb57 + e5f7adc commit 7f27fcd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

py/mpz.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,10 @@ STATIC size_t mpn_mul(mpz_dig_t *idig, mpz_dig_t *jdig, size_t jlen, mpz_dig_t *
444444
}
445445

446446
ilen = id - oidig;
447+
// check to prevent usb starvation
448+
#ifdef RUN_BACKGROUND_TASKS
449+
RUN_BACKGROUND_TASKS;
450+
#endif
447451
}
448452

449453
return ilen;

0 commit comments

Comments
 (0)
0