-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDelegates.cs
30 lines (30 loc) · 2.1 KB
/
Delegates.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
namespace Pooler {
/// <summary>
/// Event called after all tasks in store are done. First param is threads pool instance, second param is event arguments with possible synchronous tasks exceptions.
/// </summary>
/// <param name="pool">Threads instance pool instance.</param>
/// <param name="poolAllDoneEventArgs">Event arguments object with Exceptions field as List<Exception> of synchronously executed threads catched exceptions.</param>
public delegate void AllDoneHandler (Base pool, AllDoneEventArgs poolAllDoneEventArgs);
/// <summary>
/// Event called after each tasks in store is done. First param is threads pool instance, second param is event arguments with possible task result and currently and simultaneously running tasks count.
/// </summary>
/// <param name="pool">Threads instance pool instance.</param>
/// <param name="poolTaskDoneEventArgs">Event arguments object with possible task result and currently and simultaneously running tasks count.</param>
public delegate void TaskDoneHandler (Base pool, TaskDoneEventArgs poolTaskDoneEventArgs);
/// <summary>
/// Event called from background thread when there is catched any exception in synchronously executed task.
/// </summary>
/// <param name="pool">Threads instance pool instance.</param>
/// <param name="poolTaskExceptionEventArgs">Event arguments object with Exception field as Exception of synchronously executed thread catched exception.</param>
public delegate void TaskExceptionHandler (Base pool, ExceptionEventArgs poolTaskExceptionEventArgs);
/// <summary>
/// Any delegate added internaly into tasks store in Add() method with no params section or with single param accepting Pooler.Base type.
/// </summary>
/// <param name="pool">threads instance pool instance.</param>
public delegate void ParallelTaskDelegate (Parallel pool);
/// <summary>
/// Any delegate added internaly into tasks store in Add() method with no params section or with single param accepting Pooler.Base type.
/// </summary>
/// <param name="pool">threads instance pool instance.</param>
public delegate void RepeaterTaskDelegate (Repeater pool);
}