Skip to content

Hub blocks when excessive data is in buffer #8

@konnorandrews

Description

@konnorandrews

Bug report

There is a possible/likely situation where the Hub class can freeze.

Context

utils/cpp/Comm::Hub

Process

  1. Continually send data to port that the hub is attached to.
  2. Run hub.poll()
  3. The hub will freeze as the bridge attempts to generate a very large queue of messages.

Expected result

The hub should only process a set number of messages per call to hub.poll(). This will allow other operations to be done between updates.

Current result

The hub will not process any messages until the data stream has paused or stopped.

Possible Fix

Add a limit to the number of messages a bridge will return on a call to bridge.receive(). This should be a part of the Bridge interface. Preferably is would be passed to the bridge.receive() function.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions