@@ -33,12 +33,6 @@ def __enter__(self):
3333 def __exit__ (self , exc_val , exc_type , traceback ):
3434 self .release ()
3535
36- def is_locked (self ):
37- is_owned = getattr (self ._lock , "_is_owned" )
38- if not callable (is_owned ):
39- is_owned = self ._is_owned
40- return is_owned ()
41-
4236 def __call__ (self , func ):
4337 @functools .wraps (func )
4438 def _acquire_compile_lock (* args , ** kwargs ):
@@ -47,16 +41,6 @@ def _acquire_compile_lock(*args, **kwargs):
4741
4842 return _acquire_compile_lock
4943
50- def _is_owned (self ):
51- # This method is borrowed from threading.Condition.
52- # Return True if lock is owned by current_thread.
53- # This method is called only if _lock doesn't have _is_owned().
54- if self ._lock .acquire (0 ):
55- self ._lock .release ()
56- return False
57- else :
58- return True
59-
6044
6145_numba_cuda_compiler_lock = _CompilerLock ()
6246
@@ -83,9 +67,6 @@ def __enter__(self):
8367 def __exit__ (self , exc_val , exc_type , traceback ):
8468 self .release ()
8569
86- def is_locked (self ):
87- return self ._cuda_lock .is_locked () and self ._numba_lock .is_locked ()
88-
8970 def __call__ (self , func ):
9071 @functools .wraps (func )
9172 def _acquire_compile_lock (* args , ** kwargs ):
0 commit comments