bpo-41503: Fix race between setTarget and flush in logging.handlers.MemoryHandler (GH-21765)

3 files changed