Lock the thinpool when creating it