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.