Skip to content

OperatorTake (and others) use of mutating non-volatile fields #1334

Closed
@davidmoten

Description

@davidmoten

I'd love some clarification on this issue. Given say this observable:

Observable.range(1,1000).observeOn(Schedulers.computation).take(500);

why is the count in OperatorTake not protected from access from multiple threads with the keyword volatile (or using an AtomicInteger)?

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