Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hub blocks when excessive data is in buffer #8

Open
konnorandrews opened this issue Jan 9, 2018 · 0 comments
Open

Hub blocks when excessive data is in buffer #8

konnorandrews opened this issue Jan 9, 2018 · 0 comments

Comments

@konnorandrews
Copy link
Member

konnorandrews commented Jan 9, 2018

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.

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

No branches or pull requests

1 participant