File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 11Changelog
22=========
3+ v3.9.1 (2023-03-14)
4+ -------------------
5+ - Use ``time.perf_counter `` instead of ``time.monotonic `` for calculating timeouts.
6+
37v3.9.0 (2022-12-28)
48-------------------
59- Move build backend to ``hatchling `` :pr: `185 - by :user:`gaborbernat `.
Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ def acquire(
164164
165165 lock_id = id (self )
166166 lock_filename = self ._lock_file
167- start_time = time .monotonic ()
167+ start_time = time .perf_counter ()
168168 try :
169169 while True :
170170 with self ._thread_lock :
@@ -178,7 +178,7 @@ def acquire(
178178 elif blocking is False :
179179 _LOGGER .debug ("Failed to immediately acquire lock %s on %s" , lock_id , lock_filename )
180180 raise Timeout (self ._lock_file )
181- elif 0 <= timeout < time .monotonic () - start_time :
181+ elif 0 <= timeout < time .perf_counter () - start_time :
182182 _LOGGER .debug ("Timeout on acquiring lock %s on %s" , lock_id , lock_filename )
183183 raise Timeout (self ._lock_file )
184184 else :
Original file line number Diff line number Diff line change 2020nblck
2121nitpicky
2222notset
23+ perf
2324pygments
2425rdwr
2526ro
You can’t perform that action at this time.
0 commit comments