From e963cff72de0efbd4e9c0b177caab88363f67d2e Mon Sep 17 00:00:00 2001 From: DavePutz Date: Mon, 13 Jul 2020 22:27:06 -0500 Subject: [PATCH] Issue #2949 Run background checks during long multiplications --- py/mpz.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/py/mpz.c b/py/mpz.c index 7800cdcc45..8b8541c737 100644 --- a/py/mpz.c +++ b/py/mpz.c @@ -443,8 +443,11 @@ STATIC size_t mpn_mul(mpz_dig_t *idig, mpz_dig_t *jdig, size_t jlen, mpz_dig_t * *id++ = carry; } - ilen = id - oidig; + ilen = id - oidig; + // check to prevent usb starvation + RUN_BACKGROUND_TASKS; } + return ilen; }