Do not do any GUI stuff from Pool.map_async's callback.
This should prevent the GUI from hanging in Windows.
Restored threading for the database module.