<commit_before>﻿namespace AngleSharp.Services
{
    using System;
    using System.Threading.Tasks;

    /// <summary>
    /// Represents an event loop.
    /// See 7.1.4.2 Processing model.
    /// </summary>
    public interface IEventService : IService, IDisposable
    {
        /// <summary>
        /// Enqueues a given task with the associated document.
        /// </summary>
        /// <param name="task">The task to enqueue.</param>
        void Enqueue(Task task);

        /// <summary>
        /// Gets the currently running task.
        /// </summary>
        Task Current { get; }

        /// <summary>
        /// Performs a microtask checkpoint, which cleans up pending
        /// microtasks.
        /// </summary>
        /// <returns>An awaitable task.</returns>
        Task Check();

        /// <summary>
        /// Executes the compound subtask by invoking the series of
        /// steps from a microtask source.
        /// </summary>
        /// <param name="steps">The steps to run.</param>
        /// <returns>An awaitable task.</returns>
        Task Execute(Action steps);

        /// <summary>
        /// Spins the event loop until the provided condition is met.
        /// </summary>
        /// <param name="condition">The condition that needs to be fulfilled.</param>
        /// <returns>An awaitable task.</returns>
        Task Spin(Task<Boolean> condition);
    }
}<commit_msg>Condition is a normal function<commit_after>﻿namespace AngleSharp.Services
{
    using System;
    using System.Threading.Tasks;

    /// <summary>
    /// Represents an event loop.
    /// See 7.1.4.2 Processing model.
    /// </summary>
    public interface IEventService : IService, IDisposable
    {
        /// <summary>
        /// Enqueues a given task with the associated document.
        /// </summary>
        /// <param name="task">The task to enqueue.</param>
        void Enqueue(Task task);

        /// <summary>
        /// Gets the currently running task.
        /// </summary>
        Task Current { get; }

        /// <summary>
        /// Performs a microtask checkpoint, which cleans up pending
        /// microtasks.
        /// </summary>
        /// <returns>An awaitable task.</returns>
        Task Check();

        /// <summary>
        /// Executes the compound subtask by invoking the series of
        /// steps from a microtask source.
        /// </summary>
        /// <param name="steps">The steps to run.</param>
        /// <returns>An awaitable task.</returns>
        Task Execute(Action steps);

        /// <summary>
        /// Spins the event loop until the provided condition is met.
        /// </summary>
        /// <param name="condition">The condition that needs to be fulfilled.</param>
        /// <returns>An awaitable task.</returns>
        Task Spin(Func<Boolean> condition);
    }
}
{'fraction_non_alphanumeric': 0.13882106731775376, 'fraction_numerical': 0.0027903732124171608, 'mean_word_length': 1.70311027332705, 'pattern_counts': {'":': 0, '<': 53, '<?xml version=': 0, '>': 53, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '2474312', 'n_tokens_mistral': 759, 'n_tokens_neox': 731, 'n_words': 240}