Skip to content

Concurrency Crash in CurrentValueRelay Subscriptions Modification #172

@rlziii

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:)).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions