[issue43050] threading timer memory leak

fengjiang report at bugs.python.org
Wed Jan 27 21:24:03 EST 2021


New submission from fengjiang <fengjiang8 at huawei.com>:

Hi,we are transfering code from python2.7 to 3.7 and find that using threading.timer will cause memory leak. It works fine in python2.7 but not 3.7. To repreduce the problem, you can simply run the code below.

While True:
    timer = threading.Timer(5, None)
    timer.start()
    timer.cancel()

you will find the memory of progress increases rapidly

----------
components: Library (Lib)
messages: 385831
nosy: fengjiang
priority: normal
severity: normal
status: open
title: threading timer memory leak
type: performance
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43050>
_______________________________________


More information about the Python-bugs-list mailing list