Skip to content

Commit

Permalink
Stop utilisation polling before cleaning up
Browse files Browse the repository at this point in the history
  • Loading branch information
mark9064 committed Dec 23, 2019
1 parent adb0e79 commit c65cb4e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pyamdgpuinfo/pyamdgpuinfo.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,8 @@ cpdef object cleanup():
but there's no point running it when your program finishes as the
resources will be automatically freed when the process ends.
"""
if "thread_args" in GLOBALS:
stop_utilisation_polling()
GLOBALS.pop("py_gpus", None)
devices_pointer = GLOBALS.pop("gpus", None)
if devices_pointer is not None:
Expand Down

0 comments on commit c65cb4e

Please # to comment.