<?php

declare (strict_types=1);
namespace GDAVSCOPE\Amp\Process\Internal\Windows;

use GDAVSCOPE\Amp\ByteStream\ReadableResourceStream;
use GDAVSCOPE\Amp\Process\Internal\ProcessHandle;
use GDAVSCOPE\Amp\Sync\Barrier;
/**
 * @internal
 * @codeCoverageIgnore Windows only.
 */
final class WindowsHandle extends ProcessHandle
{
    public readonly Barrier $startBarrier;
    /** @psalm-suppress PropertyNotSetInConstructor */
    public ReadableResourceStream $exitCodeStream;
    /** @psalm-suppress PropertyNotSetInConstructor */
    public int $wrapperPid;
    /** @var resource[] */
    public array $sockets = [];
    /** @var string[] */
    public array $securityTokens = [];
    /**
     * @param resource $proc
     */
    public function __construct($proc)
    {
        parent::__construct($proc);
        $this->startBarrier = new Barrier(4);
    }
    public function wait(): void
    {
        // Nothing to do.
    }
}
