Skip to content

SeekableByteArrayInputStream - revert #3219? #6542

Description

@dlmarion

The class was changed in #3219 to make it thread safe. Subsequently, in #6025 the class was marked with the @NotThreadSafe annotation, which is correct for InputStreams. AtomicInteger.weakCompareAndSetVolatile, from the AtomicInteger cursor in SeekableByteArrayInputStream.read() was noted as a hot spot in some recent profiling. I'm thinking we should revert the changes made in #3219 to just use an int for the current pointer.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionThis issue describes a user question and should be answered; it may be a possible bug.

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions