eclipse / kuksa.val

kuksa.val
Apache License 2.0
95 stars 51 forks source link

[databroker] Add top level read interface. #644

Closed argerus closed 1 year ago

argerus commented 1 year ago

This is a first step towards a better internal API.

Adding "top level" read guard will enable users to reuse an already aquired quard for subsequent interaction.

The same functionality can be accomplished by adding more and more wrapper functions whose main purpose is to wrap the underlying lock (for example adding wrapper functions that would take a closure and apply it in a certain way on an aquired lock guard).

Adding access using a top level read guard seems better.

Future steps could be to gradually removing most of the existing top level wrapper functions.

argerus commented 1 year ago

Closing this for now, as there might be advantages in using wrappers.