Removing some dependencies from the threading module.