File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
Winton.Extensions.Threading.Actor/Internal Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -7,8 +7,6 @@ namespace Winton.Extensions.Threading.Actor.Internal
77{
88 internal sealed class ActorImpl : IActor
99 {
10- private readonly TaskCompletionSource < object > _stoppedPromise = new TaskCompletionSource < object > ( ) ;
11-
1210 public ActorImpl ( IActorTaskFactory actorTaskFactory )
1311 {
1412 Context = new ActorContext ( actorTaskFactory ) ;
@@ -26,17 +24,16 @@ public ActorStopWork StopWork
2624 set => Context . StopWork = value ;
2725 }
2826
29- public Task StoppedTask => _stoppedPromise . Task ;
27+ public Task StoppedTask => Context . StopCompletionSource . Task ;
3028
3129 public Task Start ( )
3230 {
3331 return Context . Start ( ) ;
3432 }
3533
36- public async Task Stop ( )
34+ public Task Stop ( )
3735 {
38- await Context . Stop ( ) ;
39- _stoppedPromise . TrySetResult ( null ) ;
36+ return Context . Stop ( ) ;
4037 }
4138
4239 public Task Enqueue ( Action action , CancellationToken cancellationToken , ActorEnqueueOptions options )
You can’t perform that action at this time.
0 commit comments