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:)).
There's a race condition where accessing
CurrentValueRelay.receive(subscriber:)has the potential to cause a crash if there is a concurrent modification to theCurrentValueRelay'ssubscriptionsproperty. This can be fixed with a lock (for example, using the library's internalLock). This crash in difficult to reproduce in practice but trivial to reproduce in a simple test (e.g. usingDispatchQueue.concurrentPerform(iterations:execute:)).