Browse Source
When using reserved(), the reserved memory cannot be read before it's written, therefore we cannot update 'tail' until the caller of reserved() is done writing. To solve that, a method called 'commit()' was added so the caller can inform that is done with the memory usage and is safe to update 'tail'. The caller also has to inform the length that was actually written. This solution was developed to work considering the usage context of this class: 1 reader and 1 writer **only**.master
Murilo Belluzzo
9 years ago
committed by
Lucas De Marchi
2 changed files with 39 additions and 20 deletions
Loading…
Reference in new issue