Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pkg6/think-lock
thinkphp lock
https://github.com/pkg6/think-lock
Last synced: 7 days ago
JSON representation
thinkphp lock
- Host: GitHub
- URL: https://github.com/pkg6/think-lock
- Owner: pkg6
- License: mit
- Created: 2024-05-06T05:48:46.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-05-06T07:58:26.000Z (7 months ago)
- Last Synced: 2024-05-07T06:26:35.761Z (6 months ago)
- Language: PHP
- Size: 5.86 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 安装
```
composer require tp5er/think-lock
```# 使用
```
acquire()) {
throw new \Exception('操作太频繁,请稍后再试');
}
try {
//TODO 业务操作
} finally {
$lock->release();
}
}
}
```更多操作参考:[symfony/lock](https://symfony.com/doc/current/components/lock.html) 文档