Skip to content

with duplicates the acquire-and-wait loop three times #14

Description

@flyingrobots

cmd_with has the wait loop for a semaphore slot, then a branch for sem-only that returns early, then the paths loop, with the release trap set up twice. One acquire_with_wait <kind> ... function and one release path would remove roughly 60 lines and the risk that a fix lands in one copy. The semaphore retry loop in sem_acquire_once/sem_release_once is a third copy of the same shape.

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

    bad-codeCode smell, coupling, or fragility to pay down

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions