bpo-40263: Fix off-by-one-error in _winapi_WaitForMultipleObjects_impl by mingwandroid ยท Pull Request #19501 ยท python/cpython

@mingwandroid

@mingwandroid mingwandroid changed the title Fix off-by-one-error in _winapi_WaitForMultipleObjects_impl [bpo-40263](https://bugs.python.org/issue40263): Fix off-by-one-error in _winapi_WaitForMultipleObjects_impl

Apr 13, 2020

@mingwandroid

@cbezault

It's unclear to me why the -1 is needed? Do we need to reserve a slot for some other handle?

EDIT: I see it now, though it's unfortunate that we get limited to 63 even in non-main threads.

cbezault

@aeros aeros changed the title [bpo-40263](https://bugs.python.org/issue40263): Fix off-by-one-error in _winapi_WaitForMultipleObjects_impl bpo-40263: Fix off-by-one-error in _winapi_WaitForMultipleObjects_impl

Apr 15, 2020

@taleinat

@nehaljwani

Got hit by this again, would be great if this patch is merged upstream!

@FaustinCarter

Plus one for please merge! Currently having to work around this.

@mingwandroid

@nehaljwani you aren't using anaconda python? /me cries. ๐Ÿ˜€

@nehaljwani

@mingwandroid I am, an upgrade to the patched build resolved the issue, however I'd still like to see this merged ๐Ÿ˜„

@mingwandroid

Is this trivial, somewhat important fix really going to make it to 1 year old before anyone reviews it? Ping @zooba

@mingwandroid

@zooba

Sorry that I missed all the pings. Wish I could have resolved this while Ray was still with us to see it.

@miss-islington

Thanks @mingwandroid for the PR, and @zooba for merging it ๐ŸŒฎ๐ŸŽ‰.. I'm working now to backport this PR to: 3.10, 3.9.
๐Ÿ๐Ÿ’โ›๐Ÿค– I'm not a witch! I'm not a witch!

@bedevere-bot

@bedevere-bot

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

Jul 28, 2021
โ€ฆs_impl (pythonGH-19501)

(cherry picked from commit 92b5dc7)

Co-authored-by: Ray Donnelly <mingw.android@gmail.com>

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

Jul 28, 2021
โ€ฆs_impl (pythonGH-19501)

(cherry picked from commit 92b5dc7)

Co-authored-by: Ray Donnelly <mingw.android@gmail.com>

miss-islington added a commit that referenced this pull request

Jul 28, 2021
โ€ฆs_impl (GH-19501)

(cherry picked from commit 92b5dc7)

Co-authored-by: Ray Donnelly <mingw.android@gmail.com>

zooba pushed a commit that referenced this pull request

Jul 28, 2021
โ€ฆs_impl (GH-19501)

(cherry picked from commit 92b5dc7)

Co-authored-by: Ray Donnelly <mingw.android@gmail.com>