Grab the GIL on shutdown when checking for exceptions by BadSingleton · Pull Request #1832 · pythonnet/pythonnet

What does this implement/fix? Explain your changes.

The GIL isn't taken when being called from the DomainUnload handler. Take it to avoid a crash when calling Exceptions.ErrorOccurred()

Does this close any currently open issues?

#1831

Checklist

Check all those that are applicable and complete.