Skip to content

Commit

Permalink
Merge pull request #3839 from luckyh/update-threading-names
Browse files Browse the repository at this point in the history
Deprecate methods from threading module
  • Loading branch information
luckyh authored Feb 8, 2024
2 parents aa3836f + e82b82c commit df8d42e
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 85 deletions.
2 changes: 1 addition & 1 deletion selftests/unit/test_utils_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def _update_env(env, key, value):
key = "%s" % utils_misc.generate_random_string(length=10)
value = "%s" % utils_misc.generate_random_string(length=10)
_update_env(env, key, value)
if termination_event.isSet():
if termination_event.is_set():
break

changing_thread = threading.Thread(target=update_env,
Expand Down
4 changes: 2 additions & 2 deletions virttest/env_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -2026,7 +2026,7 @@ def _take_screendumps(test, params, env):
os.unlink(temp_filename)

if _screendump_thread_termination_event is not None:
if _screendump_thread_termination_event.isSet():
if _screendump_thread_termination_event.is_set():
_screendump_thread_termination_event = None
break
_screendump_thread_termination_event.wait(delay)
Expand Down Expand Up @@ -2141,7 +2141,7 @@ def report_result(status, cmd, results):
cmd_details[cmd]['counter'][vm.instance] += 1

if _vm_info_thread_termination_event is not None:
if _vm_info_thread_termination_event.isSet():
if _vm_info_thread_termination_event.is_set():
_vm_info_thread_termination_event = None
for cmd in cmds:
report_result("Thread quit", cmd,
Expand Down
Loading

0 comments on commit df8d42e

Please sign in to comment.