Skip to content

Commit

Permalink
Use RLock
Browse files Browse the repository at this point in the history
Signed-off-by: Salvatore Daniele <[email protected]>
  • Loading branch information
SalDaniele committed May 15, 2024
1 parent a05c062 commit e5681b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions host.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import sys
import logging
import tempfile
from threading import Lock
from threading import RLock
from typing import Optional
from typing import Union
from typing import Any
Expand Down Expand Up @@ -210,7 +210,7 @@ def __init__(self, hostname: str, bmc: Optional[BMC] = None):
self._bmc = bmc
self._logins: list[Login] = []
self.sudo_needed = False
self._host_mutex = Lock()
self._host_mutex = RLock()

@lru_cache(maxsize=None)
def is_localhost(self) -> bool:
Expand Down

0 comments on commit e5681b2

Please sign in to comment.