➜

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients eryksun, paul.moore, steve.dower, tim.golden, vstinner, zach.ware
Date 2021-09-28.06:30:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <[email protected]>
In-reply-to
Content
FYI, waiting for a condition variable can cause a thread to enter a wait state that's interruptible, in theory, but the mechanism is different since condition variables and SRW locks are pointer-sized values in user space, instead of NT objects in kernel space. The current implementation is based on the system call NtWaitForAlertByThreadId(address, timeout), which enters the "WrAlertByThreadId" wait state. The address parameter is that of the SRW lock. The kernel sets this as the 'object' for the wait, but the wait is actually satisfied by alerting the thread directly via NtAlertThreadByThreadId(tid). ISTM, they could have added a function that calls the latter to cancel a wait on a given thread. That would have been useful for Ctrl+C since the handler executes on a new thread.
History
Date User Action Args
2021-09-28 06:30:08eryksunsetrecipients: + eryksun, paul.moore, vstinner, tim.golden, zach.ware, steve.dower
2021-09-28 06:30:07eryksunsetmessageid: <[email protected]>
2021-09-28 06:30:07eryksunlinkissue45301 messages
2021-09-28 06:30:07eryksuncreate