Python Threading Event Example In Math