quantphp
all-purpose library for a general-purpose scripting language.
class Semaphore
{
use AccessorGenerator;
#[Setter]
public bool $state = true;
#[Getter(Modifier:PROTECTED)]
private bool $isFiber = false;
public function __construct(
#[Setter] #[Getter]
public UUID $uuId
) {
{
$this->applyProperties(func_get_args());
}
protected function applyState(bool $value): mixed
{
return $this->isFiber() ? true : false;
}
}