Skip to content

Placeholder: investigate switching from a channel to locks and convars #1694

@rkuris

Description

@rkuris

But the worker is still blocking on the channel. I'm not sure I understand the difference between blocking on a channel versus blocking on a condition variable.

In an effort of separating concerns that are coupled, the code introduces an implicit dependency between the counter in the semaphore and a secondary counter that can lead to a deadlock if there are any "math" errors. Instead of trying to catch this through comprehensive code review, it would be better to use a synchronization approach where there is a single counter (if possible).

Originally posted by @bernard-avalabs in #1685 (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