Skip to content

Commit 07f2baf

Browse files
authored
Merge pull request matplotlib#21939 from anntzer/py37raf
Update comment re: register_at_fork.
2 parents e9958e1 + 6797fed commit 07f2baf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/font_manager.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1414,7 +1414,8 @@ def _get_font(filename, hinting_factor, *, _kerning_factor, thread_id):
14141414
# FT2Font objects cannot be used across fork()s because they reference the same
14151415
# FT_Library object. While invalidating *all* existing FT2Fonts after a fork
14161416
# would be too complicated to be worth it, the main way FT2Fonts get reused is
1417-
# via the cache of _get_font, which we can empty upon forking (in Py3.7+).
1417+
# via the cache of _get_font, which we can empty upon forking (not on Windows,
1418+
# which has no fork() or register_at_fork()).
14181419
if hasattr(os, "register_at_fork"):
14191420
os.register_at_fork(after_in_child=_get_font.cache_clear)
14201421

0 commit comments

Comments
 (0)