semvec/pypi-packages huggingface dataset:
LockFileSemaphore 3.0.2
Robust file-based semaphore with stale lock recovery and context manager support.
Requires Python: >=3.10

# LockFileSemaphore

A production-grade **file-based semaphore** to control concurrent access to shared resources across multiple processes or machines.

Includes atomic lock creation, stale lock recovery, timeout handling, and context manager support.

## Installation

```bash
pip install LockFileSemaphore
```

## Example Usage

### Traditional style:

```python
from LockFileSemaphore import begin_semaphore_ops, end_semaphore_ops

lock_id = begin_semaphore_ops("/tmp/resource.lock") #put path to lock file here , may be arbitrary
try:
    # Critical section
    pass
finally:
    end_semaphore_ops("/tmp/resource.lock", lock_id)
```

### Context Manager style:

```python
from LockFileSemaphore import FileLock

with FileLock("/tmp/resource.lock"): #put path to lock file here, may be arbitrary
    # Critical section
    pass
```

## Features

- Atomic file lock creation (O_CREAT | O_EXCL)
- Stale lock detection and automatic cleanup
- Timeout and retry interval configuration
- Context manager support
- Cross-platform compatibility
types-acgi 0.8.0
Add your description here
Requires Python: >=3.11

# types-acgi

:construction: This package is currently under development :construction:

ACGI will be here very soon

## Installation

```
pip install types-acgi==0.8.0
```

## Contact

For questions or suggestions, please contact [jack.burridge@mail.com](mailto:jack.burridge@mail.com).

## License

Copyright 2025 ACGI
common-acgi 0.8.0
Add your description here
Requires Python: >=3.11

# common-acgi

:construction: This package is currently under development :construction:

ACGI will be here very soon

## Installation

```
pip install common-acgi==0.8.0
```

## Contact

For questions or suggestions, please contact [jack.burridge@mail.com](mailto:jack.burridge@mail.com).

## License

Copyright 2025 ACGI
aiokafka-acgi 0.8.0
Add your description here
Requires Python: >=3.11

# aiokafka-acgi

:construction: This package is currently under development :construction:

ACGI will be here very soon

## Installation

```
pip install aiokafka-acgi==0.8.0
```

## Contact

For questions or suggestions, please contact [jack.burridge@mail.com](mailto:jack.burridge@mail.com).

## License

Copyright 2025 ACGI