library concurrency-limit
This component provides the functionality to concurrency limit on server
bogkov/concurrency-limit
This component provides the functionality to concurrency limit on server
- Wednesday, June 7, 2017
- by bogkov
- Repository
- 0 Watchers
- 0 Stars
- 4 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 2 Versions
- 0 % Grown
, (*1)
Concurrency Limit
This component provides the functionality to concurrency limit on server, (*2)
Installation
This package can be installed as a Composer dependency bogkov/concurrency-limit, (*3)
composer require bogkov/concurrency-limit
Usage
<?php
$provider = new \Bogkov\ConcurrencyLimit\Provider\Cache(new \Doctrine\Common\Cache\ArrayCache());
$handler = new \Bogkov\ConcurrencyLimit\Handler($provider);
$key = 'some-handle-key';
$limit = 1;
if (true === $handler->start($key, $limit)) {
echo 'continue process' . PHP_EOL;
$handler->end($key);
} else {
echo 'concurrency limit exceeded' . PHP_EOL;
}
dev-master
9999999-dev
This component provides the functionality to concurrency limit on server
Sources
Download
MIT
The Requires
The Development Requires
by
Bogdan Koval
concurrency limit
request limit
1.0.0
1.0.0.0
This component provides the functionality to concurrency limit on server
Sources
Download
MIT
The Requires
The Development Requires
by
Bogdan Koval
concurrency limit
request limit