Skip to content

Releases: gabr42/OmniThreadLibrary

OmniThreadLibrary 3.07

16 Feb 08:32
Compare
Choose a tag to compare
  • New features:
    • Added function IOmniPipeline.NoThrottle which disables throttling
      on an entire pipeline or one of its stages.
    • Added function IOmniBlockingCollection.IsFinalized.
    • Added function IOmniBlockingCollection.Count.
    • Added readonly property IOmniThreadPool.NumCores which returns
      number of cores this pool uses for running tasks. Changing Affinity,
      ProcessorGroups, or NUMANodes properties may modify this value.
    • Communication subsystem handles ERROR_NOT_ENOUGH_QUOTA (1816) error.
    • Added function IOmniBackgroundWorker.OnStop.
    • Added property IOmniWorkItem.SkipCompletionHandler.
      If it is set to True when work item is created or during its execution,
      request ha
      ndlers for that work item won't be called.
      If it is set to True in the OnRequestDone_Asy handler, then only
      OnRequestDone handler won't be called.
    • If ThreadDataFactory.Execute throws an exception, that exception is caught,
      ignored and ThreadData is set to nil. [issue #88]
  • Bug fixes:
    • Reverted change from 3.06: "Any change to Affinity, ProcessorGroups,
      or NUMANodes properties will reset the MaxExecuting property."
      • New behaviour is compatible with the pre-3.06 code: Initially,
        MaxExecuting is set to Environment.Process.Affinity.Count.
        This value can only be changed by the external code, not inside the
        OtlThreadPool unit.
    • In threadpool, IdleWorkerThreadTimeout_sec and WaitOnTerminate_sec
      were initialized too late.
    • Fixed TOmniValue.CastTo<TArray>. [issue #89]
    • If a future's cancellation token is signalled before the future is even
      created, the future worker is not started at all. [issue #85]
  • New demos:
    • examples\folder scanner: File scanning example implemented
      with a Pipeline.

OmniThreadLibrary 3.07 beta 1

07 Feb 09:36
Compare
Choose a tag to compare
Pre-release
  • New features:
    • Added function IOmniPipeline.NoThrottle which disables throttling
      on an entire pipeline or one of its stages.
    • Added function IOmniBlockingCollection.IsFinalized.
    • Added function IOmniBlockingCollection.Count.
    • Added readonly property IOmniThreadPool.NumCores which returns
      number of cores this pool uses for running tasks. Changing Affinity,
      ProcessorGroups, or NUMANodes properties may modify this value.
    • Communication subsystem handles ERROR_NOT_ENOUGH_QUOTA (1816) error.
    • Added function IOmniBackgroundWorker.OnStop.
    • Added property IOmniWorkItem.SkipCompletionHandler.
      If it is set to True when work item is created or during its execution,
      request handlers for that work item won't be called.
      If it is set to True in the OnRequestDone_Asy handler, then only
      OnRequestDone handler won't be called.
  • Bug fixes:
    • Reverted change from 3.06: "Any change to Affinity, ProcessorGroups,
      or NUMANodes properties will reset the MaxExecuting property."
      • New behaviour is compatible with the pre-3.06 code: Initially,
        MaxExecuting is set to Environment.Process.Affinity.Count.
        This value can only be changed by the external code, not inside the
        OtlThreadPool unit.
    • In threadpool, IdleWorkerThreadTimeout_sec and WaitOnTerminate_sec
      were initialized too late.
  • New demos:
    • examples\folder scanner: File scanning example implemented
      with a Pipeline.

OmniThreadLibrary 3.06.2

24 Oct 17:46
Compare
Choose a tag to compare
  • New features:
    • Implemented two-parameter version of Atomic initializer which
      intializes an interface type from a class type.
  • Bug fixes:
    • Programs using OtlCommon can be started on Windows XP.

OmniThreadLibrary 3.06.1

19 Oct 14:57
Compare
Choose a tag to compare
  • New features:
    • Implemented TOmniValue.Wrap and .Unwrap, a way to wrap anything
      (including TMethod and 'reference to procedure') in a TOmniObject.
      [Unwrap must be called as follows: omnivalue.Unwrap()]
  • Bug fixes:
    • Fixed enum size enforcement in DSiWin32. [Could cause an application
      to crash if OtlCommon was used in the program.]

OmniThreadLibrary 3.06

18 Oct 19:42
Compare
Choose a tag to compare
  • Breaking changes:
    • Type TWaitFor.TWaitResult renamed to TWaitFor.TWaitForResult.
    • Packages were renamed. Now they are using $LIBSUFFIX scheme.
  • New features:
    • Implemented Parallel.For(const arr: TArray).
    • New abstraction Parallel.TimedTask.
    • Added types TOmniAlignedInt32 and TOmniAlignedInt32 which replaced
      TGp4AlignedInt and TGp8AlignedInt64.
    • Implemented Environment.ProcessorGroups and Environment.NUMANode to
      provide information about processors in a massively parallel systems.
      (Windows only, simulated on other platforms.)
    • Added NUMA support
      • Implemented IOmniTaskControl.ProcessorGroup and .NUMANode.
      • Implemented IOmniTask.SetProcessorGroup and .SetNUMANode.
      • Implemented IOmniThreadPool.ProcessorGroups, .NUMANodes.
    • Implemented IOmniThreadPool.Affinity.
    • In the past, unhandled exceptions in the code handling the task execution
      were lost. Now, they are passed up to the IOmniThreadPool. If its property
      Asy_OnUnhandledWorkerException is set, exception will be passed to the event
      handler and application should react to it. The only safe way at that point
      is to log the error (and stack trace for the current thread) and terminate
      the application.
    • TOmniThreadPool.Create no longer waits on thread to be initialized. This
      allows a thread pool to be created inside DLL initialization code.
    • Implemented TOmniRecord, a simple way to wrap "anything" in a record.
    • Added thread pool lifecycle notifications to OtlHooks
      (RegisterPoolNotification, UnregisterPoolNotification).
  • Demos:
    • [HHasenack] Added more unit tests.
  • Bug fixes:
    • Fixed unsafe 64-bit pointer-to-integer casts in TOmniCS.Initialize and
      Atomic.Initialize.
    • Fixed processing of 'new message'/'new wake event' events in TWaitFor.
    • [HHasenack] Fixed memory leak in handling 'owned objects' in TOmniValue.
    • IOmniAffinity.Mask changed from DWORD to NativeUInt to correctly support
      up to 64 processors on 64-bit systems.
    • Fixed memory leaks when iterating over interface types with Parallel.For.

OmniThreadLibrary 3.05

07 Sep 16:12
Compare
Choose a tag to compare
  • New features:
    • Added Delphi 10 Seattle packages and projects.
    • Setting IOmniThreadPool.MinWorkers property will start up idle worker threads
      if total number of threads managed by the thread pool is lower than the new value.
  • Bug fixes:
    • Fixed 'record' type handling in TOmniValue.FromArray and TOmniValue.ToArray.
    • Reimplemented support for > 60 worker tasks in the OtlThreadPool unit which
      was removed from the code in 3.04a by mistake.
    • IOmniPipeline.PipelineStage[].Input and .Output are now always available
      immediately after the IOmniPipeline.Run.
    • TOmniPipeline.Destroy calls TOmniPipeline.Cancel so a pipeline can be
      shut down if user forgets to call Input.CompleteAdding.
    • When the code was waiting on less than 64 handles and timeout occurred,
      the TWaitFor.Signalled[] property was not always empty.
    • TWaitFor was not working correctly with more than 64 handles if it was
      created with the parameter-less constructor.
    • TWaitFor.MsgWaitAny now uses RegisterWaitForSingleObject approach when
      waiting on 64 handles. Previously, MsgWaitForMultipleObjectsEx was called,
      which can only handle up to 63 handles.
    • Fixed pointer arithmetic in DetailedRTTI for 64-bit compilation.
    • Fixed: affinity mask in IOmniAffinity was only 32-bit wide on 64-bit platform.