4952. [bug] A race condition on shutdown could trigger an assertion failure in dispatch.c. [RT #43822]