pwxLib Version 0.9.0 Released

Page Contents

I am happy to announce, that the PrydeWorX C++ Library, pwxLib, got its Version 0.9.0 Release last weekend.

It has been a while, almost 9 months, since the last release. But I wasn’t just busy with other projects, the library got a major overhaul of both its API and its documentation.

Further there were many tests using the Address, Leak and Thread Sanitizers of GNU gcc 9.2.0. I really hope that all issues are fixed now.

Here is the rundown of the pwxLib Version 0.9.0 Release:

Changes and additions

  • The API has been completely overhauled and should now have reached its final form. From here on the API may be extended, but changes shall be rare and removals non-existent.
  • The stupid pwx_ prefixes for header names are gone. Instead, generalized <PFoo> headers have been added, inspired by the <QFoo> headers of Qt. (some minor headers still have a pwx_ prefix to not clash with other headers, like <basic/pwx_debug.h> for example.)
  • Thread safety has been greatly improved, and gcc-9.2.0 ThreadSanitizer does not find anything any more in test_lib.
  • The API documentation, although not fully complete, yet, has been overhauled and fixed.
  • The library now has a Travis account and a .travis.yml file for automatic building on push.
  • test_lib now also tests the automatic growing of TOpenHash.
  • TOpenHash and TChainHash are now properly described.
  • Removed the artificial limit for insertions of 1000000 elements from VTHashBase.
  • Most tool macros now support, some even enforce, to be ended with a semicolon.
  • Container and element destructors now wait until no other thread is waiting for a lock, before finalizing the dtor.
  • The hash table in VTHashBase is now private and the accessors take care that nobody wreaks havoc.

Fixes

  • Fixed a possible access error in THashElement.
  • Fixed several possible access errors in VTHashBase.
  • Found and fixed a memory leak due to a typo in VTHashBase->clear().
  • The trace information eventually works correct.
  • Fixed an error in CThreadElementStore where an atomic store used loading memory order.

One important note: The automatic micro-locking of the containers and their elements overdo at the moment. This is intentional and will be optimized in future releases.

Speaking of which, the new TODO list is quite a pack.

List of current TODOs

Porting:

These are the old parts that haven’t been ported yet.

  1. CFH (CCnfFileHandler.h)

General issues:

  1. test/cluster_check.cpp : Make multi-threaded with background output queue. The single-threaded approach used right now is good for checking the speed, but that’s not the real purpose of the program.
  2. All the preprocessor magic, introduced to allow detailed thread logging, is no longer needed and should be removed. tsan is more than enough for the task.
  3. The next release should be buildable using Visual Studio 2017+
  4. When the pwxLib was initially started, Unit Tests weren’t a thing. However, for such a library Unit Tests are perfect. test_lib should really be split up into nice and convenient Unit Tests.

Important issues:

  1. After test_lib being free of any tsan errors and warnings, torture should be used to improve thread safety even further.
  2. Thread safety has been purposely overdone and has to be reduced to what really is needed now, so the (currently not so great) performance improves again.
  3. All elements and containers should support move semantics. We’re at C++17 after all!

Planned features:

  1. CFH from CCnfFileHandler.h has to be ported.
  2. CSimpleTextureCreator : A simple first version should be included.
  3. CArgHandler should allow adding arguments using initializer lists. The current way is … uhm… not nice.

I will port my pwx tools in the coming days. Stay tuned and have fun!

Leave a Comment

Your email address will not be published. Required fields are marked *