github stephenberry/glaze v2.7.1

latest releases: v9.0.0, v8.4.0, v8.3.0...
2 years ago

JSON improvements

  • Fixed raw C string parsing (e.g. parsing char string[16])
  • Added expected support for glz::format_error
    • You can pass an expected<T, glz::parse_error> to glz::format_error and it will simply return an empty string if there is no error

by @stephenberry in #1058


REPE updates

Caution

The REPE implementation is under heavy development and not stable.

REPE registry locking and thread safety

Rather than designing the registry to be duplicated per client, this rework allows the registry to be used for all clients and adds thread locking based on JSON pointer paths to allow multiple clients to read/write from the same object at the same time.

Locking is based on depth in the object tree. A chain of shared mutexes are locked. When reading from C++ memory, only shared locks are used at the read location.

An invoke lock is also used for invoking functions. Unlike variable access, the invocation lock also locks everything at the same depth as the function, which allows member functions to safely manipulate member variables from the same class.

Important

Pointers to parent members or functions that manipulate shallower depth members are not thread safe and safety has to be added by the developer.

Full Changelog: v2.7.0...v2.7.1

Don't miss a new glaze release

NewReleases is sending notifications on new releases.