Skip to content

Commit

Permalink
Fix issue ApeWorX#155: make locks depend on user id
Browse files Browse the repository at this point in the history
  • Loading branch information
gsalzer authored Dec 14, 2022
1 parent 26e1a78 commit bd5d60b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion solcx/utils/lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import sys
import tempfile
import threading
import getpass
from pathlib import Path
from typing import Any, Dict, Union

Expand Down Expand Up @@ -36,7 +37,7 @@ class _ProcessLock:

def __init__(self, lock_id: str) -> None:
self._lock = threading.Lock()
self._lock_path = Path(tempfile.gettempdir()).joinpath(f".solcx-lock-{lock_id}")
self._lock_path = Path(tempfile.gettempdir()).joinpath(f".solcx-lock-{getpass.getuser()}-{lock_id}")
self._lock_file = self._lock_path.open("w")


Expand Down

0 comments on commit bd5d60b

Please sign in to comment.