Thursday, January 09, 2014

OmniThreadLibrary 3.03b – Small version change, big update!

Yesterday I noticed a big nasty bug in the OmniThreadLibrary which was present in for a long long time. If a thread priority was not explicitly specified (by calling SetPriority OTL function or SetThreadPriority Windows API), a thread was started with idle priority (instead of normal).

How comes nobody has noticed that? Well, it looks like the Windows thread scheduler is really great and nicely schedules threads even in such case. Still, this is something that has to be fixed and I have immediately released new version.

If you’re using OTL, please download the newest version or update from the SVN.

New features

  • Added SetPriority function to the IOmniTaskConfig.
  • Added indexed writers ([number] and [name]) to both TOmniValue and TOmniValueContainer.

Bug fixes

  • Thread priority is set correctly (to 'normal') if it is not explicitly specified.
  • Corrected swapped content of 'Schedule Observed'/'Schedule Unobserved' methods in the 11_ThreadPool test (tnx to [semele]).
  • Locked<T>.Free can be called if Locked<T> owns its Value.

4 comments:

  1. Any plan for freepascal/lazarus?

    ReplyDelete
    Replies
    1. No, not until they support modern language stuff.

      Delete
  2. Replies
    1. Big problem as OTL depends a lot on Windows synchronization primitives and some parts are implemented in the assembler. The plan here is to provide an API-compatible OtlParallel unit which would probably depend on locking a bit more than the Windows version. No dates, though, as all of my programming revolves around Windows.

      Delete