Skip to content

Concurrency Crash in CurrentValueRelay Subscriptions Modification #172

Description

@rlziii

There's a race condition where accessing CurrentValueRelay.receive(subscriber:) has the potential to cause a crash if there is a concurrent modification to the CurrentValueRelay's subscriptions property. This can be fixed with a lock (for example, using the library's internal Lock). This crash in difficult to reproduce in practice but trivial to reproduce in a simple test (e.g. using DispatchQueue.concurrentPerform(iterations:execute:)).

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions