update badge by thread