Skip to content

Commit e086c57

Browse files
committed
add finalizing guard to order manager deletion
1 parent 85b8c8c commit e086c57

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

dpctl/utils/_order_manager.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import sys
12
import threading
23
import weakref
34
from collections import defaultdict
@@ -17,6 +18,8 @@ def __init__(self):
1718
self._state = _OrderManager(16)
1819

1920
def __del__(self):
21+
if sys.is_finalizing():
22+
return
2023
_local = self._state
2124
SyclEvent.wait_for(_local.get_submitted_events())
2225
SyclEvent.wait_for(_local.get_host_task_events())

0 commit comments

Comments
 (0)