File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
AsyncFiberWorks/Procedures Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 66namespace AsyncFiberWorks . Procedures
77{
88 /// <summary>
9- /// Asynchronous context switching .
9+ /// Use "await" to simply wait for the start of a task on a sequential task list .
1010 /// </summary>
11- public class FiberTaskWaiter : IDisposable
11+ public class SequentialTaskWaiter : IDisposable
1212 {
1313 private readonly object _lockObj = new object ( ) ;
1414 private IDisposable _unsubscriber ;
@@ -26,7 +26,7 @@ public class FiberTaskWaiter : IDisposable
2626 /// </summary>
2727 /// <param name="taskList"></param>
2828 /// <param name="cancellationToken"></param>
29- public FiberTaskWaiter ( ISequentialTaskListRegistry taskList , CancellationToken cancellationToken = default )
29+ public SequentialTaskWaiter ( ISequentialTaskListRegistry taskList , CancellationToken cancellationToken = default )
3030 {
3131 _thread = UserThreadPool . StartNew ( 1 ) ;
3232 _cancellationTokenExternal = cancellationToken ;
@@ -124,7 +124,7 @@ public async Task ExecutionStarted()
124124 }
125125 else
126126 {
127- throw new ObjectDisposedException ( nameof ( FiberTaskWaiter ) ) ;
127+ throw new ObjectDisposedException ( nameof ( SequentialTaskWaiter ) ) ;
128128 }
129129 }
130130 }
@@ -136,7 +136,7 @@ public async Task ExecutionStarted()
136136 }
137137
138138 /// <summary>
139- /// Unregister.
139+ /// Unregister a task from the sequential task list .
140140 /// </summary>
141141 public void Dispose ( )
142142 {
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ public async Task TestWait()
1919
2020 Func < int , Task > func = async ( maxCount ) =>
2121 {
22- using ( var activator = new FiberTaskWaiter ( taskList ) )
22+ using ( var activator = new SequentialTaskWaiter ( taskList ) )
2323 {
2424 int counter = 0 ;
2525 while ( counter < maxCount )
@@ -59,7 +59,7 @@ public async Task TestCancellation()
5959
6060 var func = new Func < Task > ( async ( ) =>
6161 {
62- using ( var activator = new FiberTaskWaiter ( taskList , cancellationToken ) )
62+ using ( var activator = new SequentialTaskWaiter ( taskList , cancellationToken ) )
6363 {
6464 try
6565 {
You can’t perform that action at this time.
0 commit comments