| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
simple approach; Split 'grow' into 'growEmpty' and 'growFull'
- java.lang.reflect.Array can instantiate an array w/ a given array-type and length
- array-type is Class<? extends T[]>
- We either deduct the array-type via array.getClass(), or pass it (ctor for empty Ringbuffer).
- Split 'growBuffer(T[] newElements, int amount, ..)' into:
- 'growEmptyBuffer(T[] newElements)'
- 'growFullBuffer(int amount)'
Allowing a more clean API w/ simpler semantics.
|
|
SyncedRingbuffer and lock-free LFRingbuffer.
SyncedRingbuffer is moved from JOGL to GlueGen, and generalized w/ common interface Ringbuffer
to allow testing diff. implementations.
- Added Ringbuffer.AllocEmptyArray factory interface, allowing to pass a constructor
to construct the generic array.
- Added functionality is growBuffer(..), allowing to either grow a full or empty buffer,
using Ringbuffer.AllocEmptyArray.
- Removed explicit 'clearRef' at get*(..), always clear the taken reference for better
interface generalization.
- Added LFRingbuffer, exposing lock-free get*(..) and put*(..) methods
using the 'Always Keep One Slot Open' pattern using the read/write index as barriers only.
- Ctor's copy an optional passed user array into the internal array,
utilizing Ringbuffer.AllocEmptyArray.
- Added unit tests.
|