Skip to content

Gracefully handle fewer than 2 requests to arbitrate between #272

@mkorbel1

Description

@mkorbel1

Describe the bug

The RotateRoundRobinArbiter doesn't handle 1 request gracefully because the preference signal just gets squashed down to 0-bits.

Something like this might be better:

    final preference =
        Logic(name: 'preference', width: max(1, log2Ceil(count)));

However, we also may need to add some checks for an empty list of things to arbitrate between (illegal scenario?). We should review other arbiters (and components) for similar issues.

To Reproduce

No response

Expected behavior

No response

Actual behavior

No response

Additional: Dart SDK info

No response

Additional: pubspec.yaml

Additional: Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions