Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mosteli opened this issue Apr 23, 2021 · 0 comments
Open

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

mosteli opened this issue Apr 23, 2021 · 0 comments

Comments

@mosteli
Copy link
Contributor

mosteli commented Apr 23, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant