Issue #14107: test: Fix a deadlock involving the memory watchdog thread.
Issue #14107: test: Fix a deadlock involving the memory watchdog thread.

sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator