Skip to content

Text rendering uses global mutable; is not thread safe #77

Open
@mosteli

Description

There is a comment about a global state variable in the Text object of TagRender.scala:

    // TODO Don't mutate global state
    private[pine] var lineBreak = false

The lineBreak variable for rendering nodes is a bit confusing to have as I think it is intuitive to assume that methods like toText on an immutable tree like Node are themselves not going to modify global state.

It would be great to remove this global state so that rendering can be done on multiple threads.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions