Skip to content
This repository was archived by the owner on Jun 8, 2020. It is now read-only.

RxJava Observables with side effects causing concurrency hazards #402

@davidjirovec

Description

@davidjirovec

Related to #387

ob.bids.forEach((key, value) -> subscription.orderBook.update(new OrderBookUpdate(

Orderbook which is modified here can be iterated downstream in the same time which causes ConcurrentModificationException. I believe clean solution to this is not to add synchronized as in #387 but to use Observables without side effects and pass immutable objects, or at least when modification of mutable object is needed, create a copy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions