Пример #1
0
 /// <summary>
 /// The start new.
 /// </summary>
 /// <param name="action">
 /// The action.
 /// </param>
 /// <param name="cancellationToken">
 /// The cancellation token.
 /// </param>
 /// <returns>
 /// The <see cref="IWorker"/>.
 /// </returns>
 public static IWorker StartNew(Action<CancellationToken> action, CancellationToken cancellationToken)
 {
     var worker = new ThreadWorker(cancellationToken);
     worker.Start(action);
     return worker;
 }