* Close database connection before stopping the executor
related issue #117004
* Close database connection before waiting for database executor to finish
related issue #117004
* fix test
* fix
* drop unused arg
* Revert "drop unused arg"
This reverts commit 8a9fe6a24a.
* docstring
* comment
If a thread exits right when we are trying to force an exception
to shut it down, setting the exception will fail with SystemError.
At this point in the shutdown process we want to move on as this
will cause the shutdown to abort