Skip to content

Commit

Permalink
Add (lack of proper) ring buffer note
Browse files Browse the repository at this point in the history
  • Loading branch information
goodboy committed Aug 11, 2021
1 parent e980f69 commit 2adb107
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions piker/data/_sharedmem.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.

"""
NumPy compatible shared memory buffers for real-time FSP.
NumPy compatible shared memory buffers for real-time IPC streaming.
"""
from dataclasses import dataclass, asdict
Expand Down Expand Up @@ -207,11 +207,16 @@ def last(
def push(
self,
data: np.ndarray,

prepend: bool = False,

) -> int:
"""Ring buffer like "push" to append data
'''Ring buffer like "push" to append data
into the buffer and return updated "last" index.
"""
NB: no actual ring logic yet to give a "loop around" on overflow
condition, lel.
'''
length = len(data)

if prepend:
Expand Down

0 comments on commit 2adb107

Please sign in to comment.