Skip to content

Commit 0fa8730

Browse files
committed
Add ISequentialTaskWaiter, ISequentialHandlerWaiter.
1 parent 7db01aa commit 0fa8730

File tree

4 files changed

+41
-2
lines changed

4 files changed

+41
-2
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using System;
2+
using System.Threading.Tasks;
3+
4+
namespace AsyncFiberWorks.Procedures
5+
{
6+
/// <summary>
7+
/// Use "await" to simply wait for the start of a task on a sequential handler list.
8+
/// </summary>
9+
/// <typeparam name="T"></typeparam>
10+
public interface ISequentialHandlerWaiter<T>
11+
{
12+
/// <summary>
13+
/// Wait for handler execution.
14+
/// </summary>
15+
/// <returns></returns>
16+
/// <exception cref="ObjectDisposedException"></exception>
17+
/// <exception cref="OperationCanceledException"></exception>
18+
Task<ProcessedFlagEventArgs<T>> ExecutionStarted();
19+
}
20+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
using System;
2+
using System.Threading.Tasks;
3+
4+
namespace AsyncFiberWorks.Procedures
5+
{
6+
/// <summary>
7+
/// Use "await" to simply wait for the start of a task on a sequential task list.
8+
/// </summary>
9+
public interface ISequentialTaskWaiter
10+
{
11+
/// <summary>
12+
/// Wait for task execution.
13+
/// </summary>
14+
/// <returns></returns>
15+
/// <exception cref="ObjectDisposedException"></exception>
16+
/// <exception cref="OperationCanceledException"></exception>
17+
Task ExecutionStarted();
18+
}
19+
}

src/AsyncFiberWorks/Procedures/SequentialHandlerWaiter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace AsyncFiberWorks.Procedures
99
/// Use "await" to simply wait for the start of a task on a sequential handler list.
1010
/// </summary>
1111
/// <typeparam name="T"></typeparam>
12-
public class SequentialHandlerWaiter<T> : IDisposable
12+
public class SequentialHandlerWaiter<T> : IDisposable, ISequentialHandlerWaiter<T>
1313
{
1414
private readonly object _lockObj = new object();
1515
private bool _executionRequested;

src/AsyncFiberWorks/Procedures/SequentialTaskWaiter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace AsyncFiberWorks.Procedures
88
/// <summary>
99
/// Use "await" to simply wait for the start of a task on a sequential task list.
1010
/// </summary>
11-
public class SequentialTaskWaiter : IDisposable
11+
public class SequentialTaskWaiter : IDisposable, ISequentialTaskWaiter
1212
{
1313
private readonly object _lockObj = new object();
1414
private bool _executionRequested;

0 commit comments

Comments
 (0)