Commit Graph

1 Commits

Author SHA1 Message Date
Martin
de307ccf20
Inspection for with threading.Lock(): (#5245)
Using `with threading.Lock():` directly has no effect.

Correct usage is:
```
lock = threading.Lock()
with lock:
    ...
```

This applies for:
  * threading.Lock
  * threading.RLock
  * threading.Condition
  * threading.Semaphore
  * threading.BoundedSemaphore

Signed-off-by: Martin Basti <mbasti@redhat.com>
2021-11-03 22:49:04 +01:00