Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Unfortunately, #98 turned out to be a bit of a failure. It worked locally, but ran into JuliaLang/Downloads.jl#94 in CI on Julia 1.7.2. Luckily, starting multiple threads actually was a bit dumb because
PlutoStaticHTML.jl
then starts threads in whichPluto.jl
starts distributed workers which can start multiple threads. This PR aims to reduce the number of started threads by startingPluto.jl
's workers from asynchronous tasks (coroutines) instead of threads. As it turns out, there is a nice Julia functionasyncmap
exactly for this purpose.This PR also adds a new
BuildOptions
setting calledmax_concurrent_runs
which specifies how many notebooks can be evaluated concurrently. This defaults to 4 to be on the safe side in case a notebook starts multiple threads too and overwhelms the system.max_concurrency
setting #36.EDIT: Checked this in a CI run. No problems now.