Skip to content

Commit 640d76a

Browse files
committed
Thread starting and stopping on worker thread.
1 parent c54068f commit 640d76a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Shuttle.Core.Threading/ProcessorThread.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,6 @@ public void Stop()
9696
throw new InvalidOperationException(Resources.ProcessorThreadNotStartedException);
9797
}
9898

99-
ProcessorThreadStopping?.Invoke(this, _eventArgs);
100-
10199
_cancellationTokenSource.Cancel();
102100

103101
Processor.TryDispose();
@@ -153,6 +151,8 @@ private async void Work()
153151
ProcessorException?.Invoke(this, new ProcessorThreadExceptionEventArgs(_eventArgs.Name, _eventArgs.ManagedThreadId, ex));
154152
}
155153
}
154+
155+
ProcessorThreadStopping?.Invoke(this, _eventArgs);
156156
}
157157

158158
public void SetState(string key, object value)

0 commit comments

Comments
 (0)