Skip to content

Releases: gabr42/OmniThreadLibrary

OmniThreadLibrary 3.08

08 Apr 19:00

Choose a tag to compare

New features

  • Implemented TLightweightMREWEx extension to TLightweightMREW (Delphi 11+ only). This class adds support for nested BeginWrite/EndWrite calls. See https://www.thedelphigeek.com/2021/02/readers-writ-47358-48721-45511-46172.html for more information.
  • Implemented interface ILightweightMREWEx with the same public methods as TLightweightMREWEx and implementing class TLightweightMREWExImpl that wraps TLightweightMREWEx.
  • Added methods Enter: T and Leave to Locked.
  • Added methods BeginRead, TryBeginRead, EndRead, BeginWrite, TryBeginWrite, EndWrite to Locked (Delphi 11+ only).
  • Locked.Access/Release now implement locking with a SRW lock (when available) in 'write' access mode. This is functionally identical to the old implementation (critical section).
  • Implemented Locked.IsInitialized.
  • SetThreadName from OtlCommon.Utils also calls SetThreadDescription Windows API.

Bug fixes

  • Fixed bad 64-bit pointer casts in OtlTaskControl. Now works with Delph 13.1.

OmniThreadLibrary 3.07.11

03 Nov 16:33

Choose a tag to compare

New features:

  • Added Delphi 13 packages supporting 64-bit IDE.
  • Implemented TOmniValue.AsUInt64.

Bug fixes:

  • [SMelnyk64] Fix: AV in TOmniParallelLoopBase.InternalExecute when taskFinalizer is not provided.
  • Fixed TOmniGroupAffinity.Create with 64 processors on 64-bit.
  • Use correct time-measurement functions in OtlEventMonitor.
  • [Anton Alisov] Fixed critical section handling in TOmniValueQueue.DoWithCritSec.
  • Avoid range check in OtlThreadPool on 64 CPU systems.

OmniThreadLibrary 3.07.10

30 Nov 08:13

Choose a tag to compare

New features

  • Thread name can be set for Parallel.TimedTask.
  • Added Delphi 12 packages.

Bug fixes

  • Parallel.Join makes sure that at least 1 task is active.

OmniThreadLibrary 3.07.9

26 Oct 08:52

Choose a tag to compare

  • New features:

    • New unit OtlSync.Utils. Requires Delphi 2009 or newer.
    • TOmniTaskControl.OnMessage and .OnTerminated free the executor if the eventHandler is nil.
    • [HHasenack] Added IOmniTaskControl.DirectExecute which executes task in the current thread.
    • [HHasenack] Added Cancel and IsCancelled to IOmniParallelTask.
    • Implemented IOmniParallelJoin.Terminate and IOmniParallelTask.Terminate.
    • Added optional timeout parameter to IOmniThreadPool.Cancel.
    • Added Delphi 11 Alexandria packages.
  • Bug fixes:

    • Fixed warnings in OtlComm.
    • Fixed link to support forum in all units.
    • Fixed TOmniMREW.TryEnterWriteLock [issue #149].
    • Fixed: Calling TOmniWaitObjectList.Remove removed only the ResponseHandlers[] handler and not the AnonResponseHandlers[] handler.
    • Fixed: IOmniIntegerSet/TOmniIntegerSet.AsMask changed to uint64 so it can store 64-bit NativeUInt without problems. [issue #148]

OmniThreadLibrary 3.07.8

03 Jun 16:45

Choose a tag to compare

  • New features:

    • Implemented IOmniTask.RegisterWaitObject with an anonymous method callback.
    • [Jacek Laskowski] donated a new OTL icon (res\OTL.ico).
    • Added Delphi 10.4 Sydney packages.
  • Bug fixes:

    • [sglienke] A reference to an anonymous method executor in IOmniTask is cleaned up as soon as possible. This allows OTL tasks to be executed from a package. [issue #132]
    • TOmniMREW.TryEnterReadLock and .TryEnterWriteLock were returning True on timeout.
    • SetOnMessage(nil) works correctly.
    • Fixed invalid FreeAndNil of an interface in TOmniFuture.Execute.
    • Compiles with Delphi 10.4 Sydney.

OmniThreadLibrary 3.07.7

23 Feb 12:17

Choose a tag to compare

  • New features:
    • [HHasenack] On XE3 and above, TOmniValue.CastTo supports casting to an interface.
    • [HHasenack] Implemented Parallel.ForEach(IEnumerator) and Parallel.ForEach(IEnumerable).
  • Bug fixes:
    • If additional wait objects registered with RegisterWaitObject were constantly signalled, timers were never called.
    • OtlParallel threads were incorrectly scheduled to the main pool instead of GlobalParallelPool unless IOmniTaskConfig.ThreadPool was used. (introduced in 3.07.6)
    • Using Parallel.Join, .For, and .ForEach with .OnStopInvoke failed with access violation if Join/For/ForEach was not executed with .NoWait.
    • Thread pool creation code waits for thread pool management thread to be started and initialized. Without that, CountQueued and CountExecuting may not be initialized correctly when thread pool creation code exits. [tnx to Roland Skinner]

OmniThreadLibrary 3.07.6

26 Nov 17:27

Choose a tag to compare

  • New features:

    • Added Delphi 10.3 Rio packages.
    • Implemented TOmniValue.LogValue.
    • Implemented TOmniBlockingCollection.FromArray, .FromRange, and .AddRange. [issue #76]
    • Added timeout parameter to TOmniMREW.TryEnterReadLock and TOmniMREW.TryExitReadLock.
  • Bug fixes:

    • Fixed race condition in TOmniBaseBoundedQueue.RemoveLink which could cause TOmniBaseBoundedQueue.Enqueue to return False when queue was empty.
    • Fixed race condition between TOmniResourceCount.[Try]Allocate and TOmniResourceCount.Release. [tnx to Stephen Melnyk]
    • ThreadData is destroyed in the worker thread and not in the thread pool management thread.
    • Reduced hints&warnings. [issue #110]

OmniThreadLibrary 3.07.5

28 Feb 15:57

Choose a tag to compare

  • General improvements:
    • Reduced number of times NameThreadForDebugging is called when threadpool
      is used.
  • Bug fixes:
    • [VyPu] fixed race condition in TOmniCriticalSection.Release which affected
      code that was using TOmniCriticalSection.LockCount.
    • OtlThreadPool did not respect OTL_DontSetThreadName define.

OmniThreadLibrary 3.07.4

19 Oct 15:20

Choose a tag to compare

  • Bug fixes:

    • TOmniEnumeratorProvider and TOmniValueEnumeratorProvider support dmoPreserveOrder option.
    • Fixed 64-bit issues in DSiWin32, GpLists, GpStringHash, and GpStuff.
  • New features:

    • Locked.Value is now both readable and writable property.
    • Moved 'inline' functions around so that they will be inlined more often.

OmniThreadLibrary 3.07.3

01 Aug 16:49

Choose a tag to compare

  • Bug fixes:

    • Nasty thread-unsafe condition fixed in DSiWin32's DSiTimeGetTime64, which is used all around OmniThreadLibrary to measure small time intervals.
  • New features:

    • SetTimer accepts TProc and TProc timer methods.
    • IOmniTask implements method InvokeOnSelf which can be used to schedule anonymous function execution from a task back to self.