Skip to content

Format files with multiple threads#1041

Open
jvierling wants to merge 4 commits into
revelc:mainfrom
jvierling:main
Open

Format files with multiple threads#1041
jvierling wants to merge 4 commits into
revelc:mainfrom
jvierling:main

Conversation

@jvierling

Copy link
Copy Markdown

Implements multi-threaded formatting using a fixed-size thread pool (resolves #537). The number of threads can be configured by a Mojo parameter and defaults to 1. The formatters that may not be thread-safe are instantiated as ThreadLocals. As preparatory step the type of the formatter options are narrowed to ImmutableMap to rule out any mutation.

jvierling added 4 commits June 9, 2026 21:14
This is a preparatory step for the implementation of concurrent
formatting to rule out mutation of the options.
* Adds mojo parameter `threads` to control the number of threads used
for formatting.
* Java and Javascript formatters use thread locals
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

Successfully merging this pull request may close these issues.

Allow to use concurrent threads for faster formatting

1 participant