Message397549
After https://github.com/python/cpython/pull/18334, a "while condition: pass" in a thread will preclude releasing the GIL, hanging the program with CPU at 100%.
Trivial to reproduce:
"""
#!/usr/bin/env python3.10
import threading
import time
def worker():
while cont:
pass
def main():
global cont
cont = True
t = threading.Thread(target=worker)
t.start()
time.sleep(1)
cont = False
t.join()
if __name__ == '__main__':
main()
""" |
|
| Date |
User |
Action |
Args |
| 2021-07-15 13:26:08 | jcea | set | recipients:
+ jcea, Mark.Shannon, pablogsal |
| 2021-07-15 13:26:07 | jcea | set | messageid: <[email protected]> |
| 2021-07-15 13:26:07 | jcea | link | issue44645 messages |
| 2021-07-15 13:26:07 | jcea | create | |
|