This line and the comment above can be merged into this:

```python
if not lock.acquire(wait=False):
```