Skip to content

Proposal: extract raw Ring Buffer structure out of channels module #22

Description

@ZoomRmc

While doing refactoring of channels (#21), I've separated all the raw ring/circular buffer logic into it's own object and put it in a module. I think this could prove useful:

  • Separation of concern => more succinct, easily readable and testable code.
  • Current channel implementation just adds locking around enqueue/dequeue ops and fullness checks, so there's nothing invasive which could prevent separation.
  • Having a separate module for a basic data structure could provide a basis for a public-facing typed version easily (the only real work necessary is a JS version, which can't use any raw memory ops).

I can start with just having a separate object in the same module, and if this channel implementation stabilizes, it can be moved out and open the ways of using the basic data structure in other places.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions