Use proper Python threading initialization code