AllenNeuralDynamics / AllenNeuralDynamics/brainwasher
Cleanup `flowpath_lock` debug output
オープン
- 主要言語
- Python
- スター
- 0
- フォーク
- 1
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Acquiring the `RLock` should disambiguate if we have already acquired it and not print the same message.
We can do this with:
```python
import threading
rlock = threading.RLock()
# Check if we are acquiring it for the first time.
try:
if rlock.acquire(blocking=False): # reacquiring
fn()
else:
printf("rlock acquired for the first time.")
rlock.acquire() # First acquisition
fn()
finally:
rlock.release() # Release the initial acquisition
```
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。