mirror of
https://github.com/element-hq/synapse
synced 2024-10-02 12:42:41 +00:00
Check that gc
method is available before using in synapse/app/_base
(#11816)
* add check that gc.freeze is available before calling * newsfragment * lint * Update comment Co-authored-by: Dan Callahan <danc@element.io> Co-authored-by: Dan Callahan <danc@element.io>
This commit is contained in:
parent
6a72c910f1
commit
b8bf600700
2 changed files with 8 additions and 5 deletions
1
changelog.d/11816.misc
Normal file
1
changelog.d/11816.misc
Normal file
|
@ -0,0 +1 @@
|
|||
Drop support for Python 3.6, which is EOL.
|
|
@ -468,6 +468,8 @@ async def start(hs: "HomeServer") -> None:
|
|||
# everything currently allocated are things that will be used for the
|
||||
# rest of time. Doing so means less work each GC (hopefully).
|
||||
#
|
||||
# PyPy does not (yet?) implement gc.freeze()
|
||||
if hasattr(gc, "freeze"):
|
||||
gc.collect()
|
||||
gc.freeze()
|
||||
|
||||
|
|
Loading…
Reference in a new issue