-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Closed
Labels
Description
I'm debugging a production problem where a timeout did not fire so having a close look at FlowableTimeoutTimed. I notice in TimeoutTimedSubscriber that multiple terminal events can be emitted to the downstream subscriber in race between the scheduled timeout runnable and the onError and onComplete methods. The volatile done flag doesn't provide complete protection unless we turn it into an AtomicBoolean and use compareAndSet.
The other thing I notice is that the timer field is accessed synchronously (only via onSubscribe and onNext) so rather than an AtomicReference can be a mutable field.
I can make PR if you think these are valid.
Reactions are currently unavailable