Table of Contents

Class EventLoopExtensions

Namespace
AngleSharp.Browser
Assembly
AngleSharp.dll

A set of useful extensions for the event loop.

public static class EventLoopExtensions
Inheritance
EventLoopExtensions
Inherited Members

Methods

Enqueue(IEventLoop?, Action, TaskPriority)

Enqueues another action without considering the cancellation token.

public static void Enqueue(this IEventLoop? loop, Action action, TaskPriority priority = TaskPriority.Normal)

Parameters

loop IEventLoop

The loop to extend.

action Action

The action to enqueue.

priority TaskPriority

The priority of the item.

EnqueueAsync<T>(IEventLoop?, Func<CancellationToken, T>, TaskPriority)

Enqueues another function with respecting the async nature. Exceptions will be emitted respectively.

public static Task<T> EnqueueAsync<T>(this IEventLoop? loop, Func<CancellationToken, T> action, TaskPriority priority = TaskPriority.Normal)

Parameters

loop IEventLoop

The loop to extend.

action Func<CancellationToken, T>

The action to enqueue.

priority TaskPriority

The priority of the item.

Returns

Task<T>

A task that is completed when the action has been invoked.

Type Parameters

T