Could someone please tell me what purpose does UsedRange have at all in PartData API ? From what I understand, it's merely additional noise to solve our own internal problems, but gives nothing but trouble to users of the API. Those that aren't quite following what I'm talking about:
PartData *pd; UsedRange *ur = pd->getRange(partsize); LockedRange *lr = ur->getLock(size); lr->write(begin, data); lr = ur->getLock(size); lr->write(begin, data);What purpose does UsedRange have here ? None - UsedRange must still forward the getLock() calls to PartData, since those locks must be shared between multiple UsedRanges, ... why don't we just request locks from PartData directly? Indeed - it would greatly simplify the API ... bye-bye UsedRange.
Just means the internals of PartData just got somewhat more complex. But - better have complex internals, and easy API, instead of vice versa.
Madcat, ZzZz