2222
2323__lazy_modules__ : list [str ]
2424
25- import threading
25+ import _thread
2626import types
2727import typing
2828
@@ -111,7 +111,7 @@ class _AttachedMethod:
111111 cls : type
112112
113113 _generated_method : types .FunctionType
114- _lock : threading . Lock
114+ _lock : _thread . LockType
115115
116116 def __init__ (
117117 self ,
@@ -163,10 +163,19 @@ def get_init_parameters(cls: type) -> _FunctionParameterType: ...
163163def get_counter_field_names (argcount : int ) -> list [str ]: ...
164164
165165class _CacheStats :
166- __slots__ : tuple [str , str , str ]
166+ __slots__ : tuple [str , ... ]
167167 hits : int
168168 misses : int
169169 skips : int
170+
171+ _hitlock : _thread .LockType
172+ _misslock : _thread .LockType
173+ _skiplock : _thread .LockType
174+
175+ def add_hit (self ) -> None : ...
176+ def add_miss (self ) -> None : ...
177+ def add_skip (self ) -> None : ...
178+
170179 @property
171180 def hit_percent (self ) -> float : ...
172181 def __init__ (self ) -> None : ...
@@ -177,7 +186,7 @@ class _SimpleCache:
177186 _func : Callable [..., types .FunctionType ]
178187 _internal_cache : dict [tuple , types .FunctionType ]
179188 _stats : _CacheStats
180- _lock_cache : dict [tuple , threading . Lock ]
189+ _lock_cache : dict [tuple , _thread . LockType ]
181190 def __init__ (
182191 self ,
183192 func : types .FunctionType ,
0 commit comments