@gabr42 gabr42 released this Jul 5, 2017 · 76 commits to master since this release

Assets 2
  • Potentially breaking change:

    • Cancel(taskID) will signal task's cancellation token before calling task's Terminate
      method. CancelAll will signal cancellation token for all running tasks before calling
      their Terminate method.
      Old behaviour (no CancellationToken.Signal before Terminate) can be achieved by
      calling overloaded version of the functions accepting the signalCancellationToken
      parameter or by setting IOmniThreadPool.Options to [tpoPreventCancellationTokenOnCancel].
  • New features:

    • Added OnStop overload that accepts 'reference to procedure (const task: IOmniTask)'
      to Parallel.Join and Parallel.ParallelTask.
    • Added OnStopInvoke to all Parallel abstractions that implement OnStop method.
      • IOmniParallelLoop.OnStopInvoke and IOmniParallelMapper<T1, T2> are only
        available on XE7 and newer compilers.
    • Added IOmniTaskConfig.NoThreadPool. This allows high-level abstractions to
      bypass thread pool entirely and run in 'non-pooled' threads.
    • TOmniCS.Initialize uses global lock to synchronize initialization instead of
      a CAS operation. This fixes all reasons for the infamous error
      "TOmniCS.Initialize: XXX is not properly aligned!".
  • Bug fixes:

  • Parallel.Future did not create task with the .Unobserved qualifier.

  • New demos:

    • 66_ThreadsInThreads: Demonstrates how to manage OTL threads from other OTL threads
      and from TThread threads.