[Asterisk-code-review] vector: Traversal, retrieval, insert and locking enhancements (asterisk[13])
Matt Jordan
asteriskteam at digium.com
Mon May 4 13:47:06 CDT 2015
Matt Jordan has posted comments on this change.
Change subject: vector: Traversal, retrieval, insert and locking enhancements
......................................................................
Patch Set 5:
> > I don't think there should be a rwlock version of the vector
> > macros. This just leads to an explosion of vector macro flavors
> > just like the linked list versions.
> >
> > Since the vector implementation is entirely done by macro you can
> > easily use any external locking mechanism required. You can also
> > control how long to hold the lock over a group of vector
> > operations.
>
> In order to save time and effort someone needs to start putting
> comments in unliked things saying DON'T FOLLOW THIS PATTERN.
>
> The reason I added the locking was to make migration from
> containers easier. I don't see the harm. I'm not forcing anyone
> to use them.
I don't think anyone had ever articulated this objection before, so your consternation is appropriate.
To be fair, I understand Richard's point about not wanting to explode the vector macros. At the same time, our previous idiom was certainly to embed the locks directly within the data structure and/or macros defining them. That certainly has been the case with the linkedlists, doubly linkedlists, and - while well abstracted away - the ao2 containers as well.
While I'm not sure we will really need the locking variants of the vector, I'm not against them being added - particularly if there is a use case for them.
--
To view, visit https://gerrit.asterisk.org/339
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I2e07ecc709d2f5f91bcab8904e5e9340609b00e0
Gerrit-PatchSet: 5
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-HasComments: No
More information about the asterisk-code-review
mailing list