<commit_before><?php

namespace Interop\Async\EventLoop;

interface EventLoopInterface
{
    /**
     * @return void
     */
    public function run(callable $onStart = null);

    /**
     * @return void
     */
    public function tick(bool $block = true);

    /**
     * @return void
     */
    public function stop();

    /**
     * @return WatcherInterface
     */
    public function queue(callable $callback, ...$args);

    /**
     * @return WatcherInterface
     */
    public function once(callable $callback, float $time, $data = null);

    /**
     * @return WatcherInterface
     */
    public function repeat(callable $callback, float $interval, $data = null);

    /**
     * @return WatcherInterface
     */
    public function onReadable($stream, callable $callback, $data = null);

    /**
     * @return WatcherInterface
     */
    public function onWritable($stream, callable $callback, $data = null);

    /**
     * @return WatcherInterface
     */
    public function onSignal(int $signo, callable $callback, $data = null);

    /**
     * @return WatcherInterface
     */
    public function onError(callable $callback);
}<commit_msg>Updated with response from discussions on issues<commit_after><?php

namespace Interop\Async\EventLoop;

interface EventLoopInterface
{
    /**
     * @return void
     */
    public function run(callable $onStart = null);

    /**
     * @return void
     */
    public function stop();

    /**
     * @return string
     */
    public function defer(callable $callback);

    /**
     * @return string
     */
    public function delay(callable $callback, float $time);

    /**
     * @return string
     */
    public function repeat(callable $callback, float $interval);

    /**
     * @return string
     */
    public function onReadable($stream, callable $callback);

    /**
     * @return string
     */
    public function onWritable($stream, callable $callback);

    /**
     * @return string
     */
    public function onSignal(int $signo, callable $callback);

    /**
     * @return string
     */
    public function onError(callable $callback);

    /**
     * @return void
     */
    public function enable(string $watcherId);

    /**
     * @return void
     */
    public function disable(string $watcherId);

    /**
     * @return void
     */
    public function cancel(string $watcherId);
}
{'fraction_non_alphanumeric': 0.12709731543624161, 'fraction_numerical': 0.0, 'mean_word_length': 2.294198895027624, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '211059', 'n_tokens_mistral': 683, 'n_tokens_neox': 662, 'n_words': 176}