1
0
Fork 0
mirror of synced 2024-05-19 12:12:36 +12:00
appwrite/src/Appwrite/Database/Pool.php
2021-06-22 11:16:29 +02:00

22 lines
377 B
PHP

<?php
namespace Appwrite\Database;
use Swoole\Coroutine\Channel;
abstract class Pool
{
protected Channel $pool;
protected $available = true;
protected $size = 5;
abstract public function get();
public function destruct()
{
$this->available = false;
while (!$this->pool->isEmpty()) {
$this->pool->pop();
}
}
}