# lock **Repository Path**: wfdaj/lock ## Basic Information - **Project Name**: lock - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-10-17 - **Last Updated**: 2024-10-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Lock A simple locking library ... that is based on file locking (and that's awesome). [![Latest Stable Version](https://poser.pugx.org/ivopetkov/lock/v/stable)](https://packagist.org/packages/ivopetkov/lock) [![License](https://poser.pugx.org/ivopetkov/lock/license)](https://packagist.org/packages/ivopetkov/lock) ## Why you need it Imagine you have two tasks that you do not want to overlap (they modify the same data for example). Using this library will bring you peace of mind. ## Keep in mind The library uses file locking mechanism to ensure it works correctly. This means that it can be used only on applications/instances/processes that share a common file system. A website on one server does just that. ## Install via Composer ```shell composer require ivopetkov/lock ``` ## Usage Using the following two methods (acquire() and release()) will ensure no two applications/instances/processes execute the code between them. ```php