Skip to content

precompile: Support detaching and monitoring etc.#4602

Merged
IanButterworth merged 1 commit intoJuliaLang:masterfrom
IanButterworth:ib/background_precompile
Apr 1, 2026
Merged

precompile: Support detaching and monitoring etc.#4602
IanButterworth merged 1 commit intoJuliaLang:masterfrom
IanButterworth:ib/background_precompile

Conversation

@IanButterworth
Copy link
Copy Markdown
Member

@IanButterworth IanButterworth commented Jan 25, 2026

@IanButterworth IanButterworth force-pushed the ib/background_precompile branch from bc59931 to c03f2d1 Compare January 25, 2026 16:20
@IanButterworth
Copy link
Copy Markdown
Member Author

@vchuravy this isn't ready for code review. It's just a demo of the interface. Sorry, I should've been clearer up top.

@IanButterworth IanButterworth marked this pull request as draft January 25, 2026 16:23
@IanButterworth IanButterworth force-pushed the ib/background_precompile branch 2 times, most recently from d057842 to 078da27 Compare January 25, 2026 17:48
@IanButterworth
Copy link
Copy Markdown
Member Author

Started moving the code over to Base JuliaLang/julia@master...IanButterworth:julia:ib/background_precompile

@IanButterworth IanButterworth force-pushed the ib/background_precompile branch from efe037a to 850e5d7 Compare February 6, 2026 00:09
@IanButterworth IanButterworth changed the title Move auto precompilation to background task precompile: Support detaching and monitoring etc. Feb 6, 2026
IanButterworth added a commit to IanButterworth/julia that referenced this pull request Feb 6, 2026
…ontrols

Run package precompilation in a background task, with a monitor task that
streams output and handles keyboard input. This enables users to detach
from precompilation (letting it continue silently) and reattach later.

Keyboard controls during precompilation:
- 'c' cancels all subprocesses (SIGKILL)
- 'd' detaches from monitoring (when detachable=true)
- 'i' sends a profiling signal (SIGINFO/SIGUSR1) for profile peek
- Ctrl-C interrupts subprocesses (SIGINT) and shows output

Signal broadcasting uses per-subprocess Channel{Int32} registered in
BACKGROUND_PRECOMPILE.signal_channels. The keyboard handler broadcasts
to all channels, and per-process tasks forward signals via kill().

Adds a detachable::Bool keyword to precompilepkgs, and background control
functions: monitor_background_precompile, stop_background_precompile,
is_precompiling_in_background.

The Pkg.jl side of this change is in JuliaLang/Pkg.jl#4602.

Co-Authored-By: Claude <noreply@anthropic.com>
IanButterworth added a commit to IanButterworth/julia that referenced this pull request Feb 6, 2026
…ontrols

Run package precompilation in a background task, with a monitor task that
streams output and handles keyboard input. This enables users to detach
from precompilation (letting it continue silently) and reattach later.

Keyboard controls during precompilation:
- 'c' cancels all subprocesses (SIGKILL)
- 'd' detaches from monitoring (when detachable=true)
- 'i' sends a profiling signal (SIGINFO/SIGUSR1) for profile peek
- Ctrl-C interrupts subprocesses (SIGINT) and shows output

Signal broadcasting uses per-subprocess Channel{Int32} registered in
BACKGROUND_PRECOMPILE.signal_channels. The keyboard handler broadcasts
to all channels, and per-process tasks forward signals via kill().

Adds a detachable::Bool keyword to precompilepkgs, and background control
functions: monitor_background_precompile, stop_background_precompile,
is_precompiling_in_background.

The Pkg.jl side of this change is in JuliaLang/Pkg.jl#4602.

Co-Authored-By: Claude <noreply@anthropic.com>
IanButterworth added a commit to IanButterworth/julia that referenced this pull request Feb 6, 2026
…ontrols

Run package precompilation in a background task, with a monitor task that
streams output and handles keyboard input. This enables users to detach
from precompilation (letting it continue silently) and reattach later.

Keyboard controls during precompilation:
- 'c' cancels all subprocesses (SIGKILL)
- 'd' detaches from monitoring (when detachable=true)
- 'i' sends a profiling signal (SIGINFO/SIGUSR1) for profile peek
- Ctrl-C interrupts subprocesses (SIGINT) and shows output

Signal broadcasting uses per-subprocess Channel{Int32} registered in
BACKGROUND_PRECOMPILE.signal_channels. The keyboard handler broadcasts
to all channels, and per-process tasks forward signals via kill().

Adds a detachable::Bool keyword to precompilepkgs, and background control
functions: monitor_background_precompile, stop_background_precompile,
is_precompiling_in_background.

The Pkg.jl side of this change is in JuliaLang/Pkg.jl#4602.

Co-Authored-By: Claude <noreply@anthropic.com>
IanButterworth added a commit to IanButterworth/julia that referenced this pull request Feb 6, 2026
…ontrols

Run package precompilation in a background task, with a monitor task that
streams output and handles keyboard input. This enables users to detach
from precompilation (letting it continue silently) and reattach later.

Keyboard controls during precompilation:
- 'c' cancels all subprocesses (SIGKILL)
- 'd' detaches from monitoring (when detachable=true)
- 'i' sends a profiling signal (SIGINFO/SIGUSR1) for profile peek
- Ctrl-C interrupts subprocesses (SIGINT) and shows output

Signal broadcasting uses per-subprocess Channel{Int32} registered in
BACKGROUND_PRECOMPILE.signal_channels. The keyboard handler broadcasts
to all channels, and per-process tasks forward signals via kill().

Adds a detachable::Bool keyword to precompilepkgs, and background control
functions: monitor_background_precompile, stop_background_precompile,
is_precompiling_in_background.

The Pkg.jl side of this change is in JuliaLang/Pkg.jl#4602.

Co-Authored-By: Claude <noreply@anthropic.com>
IanButterworth added a commit to IanButterworth/julia that referenced this pull request Feb 6, 2026
…ontrols

Run package precompilation in a background task, with a monitor task that
streams output and handles keyboard input. This enables users to detach
from precompilation (letting it continue silently) and reattach later.

Keyboard controls during precompilation:
- 'c' cancels all subprocesses (SIGKILL)
- 'd' detaches from monitoring (when detachable=true)
- 'i' sends a profiling signal (SIGINFO/SIGUSR1) for profile peek
- Ctrl-C interrupts subprocesses (SIGINT) and shows output

Signal broadcasting uses per-subprocess Channel{Int32} registered in
BACKGROUND_PRECOMPILE.signal_channels. The keyboard handler broadcasts
to all channels, and per-process tasks forward signals via kill().

Adds a detachable::Bool keyword to precompilepkgs, and background control
functions: monitor_background_precompile, stop_background_precompile,
is_precompiling_in_background.

The Pkg.jl side of this change is in JuliaLang/Pkg.jl#4602.

Co-Authored-By: Claude <noreply@anthropic.com>
IanButterworth added a commit to IanButterworth/julia that referenced this pull request Feb 6, 2026
…ontrols

Run package precompilation in a background task, with a monitor task that
streams output and handles keyboard input. This enables users to detach
from precompilation (letting it continue silently) and reattach later.

Keyboard controls during precompilation:
- 'c' cancels all subprocesses (SIGKILL)
- 'd' detaches from monitoring (when detachable=true)
- 'i' sends a profiling signal (SIGINFO/SIGUSR1) for profile peek
- Ctrl-C interrupts subprocesses (SIGINT) and shows output

Signal broadcasting uses per-subprocess Channel{Int32} registered in
BACKGROUND_PRECOMPILE.signal_channels. The keyboard handler broadcasts
to all channels, and per-process tasks forward signals via kill().

Adds a detachable::Bool keyword to precompilepkgs, and background control
functions: monitor_background_precompile, stop_background_precompile,
is_precompiling_in_background.

The Pkg.jl side of this change is in JuliaLang/Pkg.jl#4602.

Co-Authored-By: Claude <noreply@anthropic.com>
IanButterworth added a commit to IanButterworth/julia that referenced this pull request Feb 6, 2026
…ontrols

Run package precompilation in a background task, with a monitor task that
streams output and handles keyboard input. This enables users to detach
from precompilation (letting it continue silently) and reattach later.

Keyboard controls during precompilation:
- 'c' cancels all subprocesses (SIGKILL)
- 'd' detaches from monitoring (when detachable=true)
- 'i' sends a profiling signal (SIGINFO/SIGUSR1) for profile peek
- Ctrl-C interrupts subprocesses (SIGINT) and shows output

Signal broadcasting uses per-subprocess Channel{Int32} registered in
BACKGROUND_PRECOMPILE.signal_channels. The keyboard handler broadcasts
to all channels, and per-process tasks forward signals via kill().

Adds a detachable::Bool keyword to precompilepkgs, and background control
functions: monitor_background_precompile, stop_background_precompile,
is_precompiling_in_background.

The Pkg.jl side of this change is in JuliaLang/Pkg.jl#4602.

Co-Authored-By: Claude <noreply@anthropic.com>
IanButterworth added a commit to IanButterworth/julia that referenced this pull request Feb 6, 2026
…ontrols

Run package precompilation in a background task, with a monitor task that
streams output and handles keyboard input. This enables users to detach
from precompilation (letting it continue silently) and reattach later.

Keyboard controls during precompilation:
- 'c' cancels all subprocesses (SIGKILL)
- 'd' detaches from monitoring (when detachable=true)
- 'i' sends a profiling signal (SIGINFO/SIGUSR1) for profile peek
- Ctrl-C interrupts subprocesses (SIGINT) and shows output

Signal broadcasting uses per-subprocess Channel{Int32} registered in
BACKGROUND_PRECOMPILE.signal_channels. The keyboard handler broadcasts
to all channels, and per-process tasks forward signals via kill().

Adds a detachable::Bool keyword to precompilepkgs, and background control
functions: monitor_background_precompile, stop_background_precompile,
is_precompiling_in_background.

The Pkg.jl side of this change is in JuliaLang/Pkg.jl#4602.

Co-Authored-By: Claude <noreply@anthropic.com>
IanButterworth added a commit to IanButterworth/julia that referenced this pull request Feb 6, 2026
…ontrols

Run package precompilation in a background task, with a monitor task that
streams output and handles keyboard input. This enables users to detach
from precompilation (letting it continue silently) and reattach later.

Keyboard controls during precompilation:
- 'c' cancels all subprocesses (SIGKILL)
- 'd' detaches from monitoring (when detachable=true)
- 'i' sends a profiling signal (SIGINFO/SIGUSR1) for profile peek
- Ctrl-C interrupts subprocesses (SIGINT) and shows output

Signal broadcasting uses per-subprocess Channel{Int32} registered in
BACKGROUND_PRECOMPILE.signal_channels. The keyboard handler broadcasts
to all channels, and per-process tasks forward signals via kill().

Adds a detachable::Bool keyword to precompilepkgs, and background control
functions: monitor_background_precompile, stop_background_precompile,
is_precompiling_in_background.

The Pkg.jl side of this change is in JuliaLang/Pkg.jl#4602.

Co-Authored-By: Claude <noreply@anthropic.com>
IanButterworth added a commit to IanButterworth/julia that referenced this pull request Feb 6, 2026
…ontrols

Run package precompilation in a background task, with a monitor task that
streams output and handles keyboard input. This enables users to detach
from precompilation (letting it continue silently) and reattach later.

Keyboard controls during precompilation:
- 'c' cancels all subprocesses (SIGKILL)
- 'd' detaches from monitoring (when detachable=true)
- 'i' sends a profiling signal (SIGINFO/SIGUSR1) for profile peek
- Ctrl-C interrupts subprocesses (SIGINT) and shows output

Signal broadcasting uses per-subprocess Channel{Int32} registered in
BACKGROUND_PRECOMPILE.signal_channels. The keyboard handler broadcasts
to all channels, and per-process tasks forward signals via kill().

Adds a detachable::Bool keyword to precompilepkgs, and background control
functions: monitor_background_precompile, stop_background_precompile,
is_precompiling_in_background.

The Pkg.jl side of this change is in JuliaLang/Pkg.jl#4602.

Co-Authored-By: Claude <noreply@anthropic.com>
IanButterworth added a commit to IanButterworth/julia that referenced this pull request Feb 6, 2026
…ontrols

Run package precompilation in a background task, with a monitor task that
streams output and handles keyboard input. This enables users to detach
from precompilation (letting it continue silently) and reattach later.

Keyboard controls during precompilation:
- 'c' cancels all subprocesses (SIGKILL)
- 'd' detaches from monitoring (when detachable=true)
- 'i' sends a profiling signal (SIGINFO/SIGUSR1) for profile peek
- Ctrl-C interrupts subprocesses (SIGINT) and shows output

Signal broadcasting uses per-subprocess Channel{Int32} registered in
BACKGROUND_PRECOMPILE.signal_channels. The keyboard handler broadcasts
to all channels, and per-process tasks forward signals via kill().

Adds a detachable::Bool keyword to precompilepkgs, and background control
functions: monitor_background_precompile, stop_background_precompile,
is_precompiling_in_background.

The Pkg.jl side of this change is in JuliaLang/Pkg.jl#4602.

Co-Authored-By: Claude <noreply@anthropic.com>
IanButterworth added a commit to IanButterworth/julia that referenced this pull request Feb 6, 2026
…ontrols

Run package precompilation in a background task, with a monitor task that
streams output and handles keyboard input. This enables users to detach
from precompilation (letting it continue silently) and reattach later.

Keyboard controls during precompilation:
- 'c' cancels all subprocesses (SIGKILL)
- 'd' detaches from monitoring (when detachable=true)
- 'i' sends a profiling signal (SIGINFO/SIGUSR1) for profile peek
- Ctrl-C interrupts subprocesses (SIGINT) and shows output

Signal broadcasting uses per-subprocess Channel{Int32} registered in
BACKGROUND_PRECOMPILE.signal_channels. The keyboard handler broadcasts
to all channels, and per-process tasks forward signals via kill().

Adds a detachable::Bool keyword to precompilepkgs, and background control
functions: monitor_background_precompile, stop_background_precompile,
is_precompiling_in_background.

The Pkg.jl side of this change is in JuliaLang/Pkg.jl#4602.

Co-Authored-By: Claude <noreply@anthropic.com>
IanButterworth added a commit to IanButterworth/julia that referenced this pull request Feb 7, 2026
…ontrols

Run package precompilation in a background task, with a monitor task that
streams output and handles keyboard input. This enables users to detach
from precompilation (letting it continue silently) and reattach later.

Keyboard controls during precompilation:
- 'c' cancels all subprocesses (SIGKILL)
- 'd' detaches from monitoring (when detachable=true)
- 'i' sends a profiling signal (SIGINFO/SIGUSR1) for profile peek
- Ctrl-C interrupts subprocesses (SIGINT) and shows output

Signal broadcasting uses per-subprocess Channel{Int32} registered in
BACKGROUND_PRECOMPILE.signal_channels. The keyboard handler broadcasts
to all channels, and per-process tasks forward signals via kill().

Adds a detachable::Bool keyword to precompilepkgs, and background control
functions: monitor_background_precompile, stop_background_precompile,
is_precompiling_in_background.

The Pkg.jl side of this change is in JuliaLang/Pkg.jl#4602.

Co-Authored-By: Claude <noreply@anthropic.com>
IanButterworth added a commit to IanButterworth/julia that referenced this pull request Feb 7, 2026
…ontrols

Run package precompilation in a background task, with a monitor task that
streams output and handles keyboard input. This enables users to detach
from precompilation (letting it continue silently) and reattach later.

Keyboard controls during precompilation:
- 'c' cancels all subprocesses (SIGKILL)
- 'd' detaches from monitoring (when detachable=true)
- 'i' sends a profiling signal (SIGINFO/SIGUSR1) for profile peek
- Ctrl-C interrupts subprocesses (SIGINT) and shows output

Signal broadcasting uses per-subprocess Channel{Int32} registered in
BACKGROUND_PRECOMPILE.signal_channels. The keyboard handler broadcasts
to all channels, and per-process tasks forward signals via kill().

Adds a detachable::Bool keyword to precompilepkgs, and background control
functions: monitor_background_precompile, stop_background_precompile,
is_precompiling_in_background.

The Pkg.jl side of this change is in JuliaLang/Pkg.jl#4602.

Co-Authored-By: Claude <noreply@anthropic.com>
@vtjnash
Copy link
Copy Markdown
Member

vtjnash commented Feb 7, 2026

Will close #4359

IanButterworth added a commit to IanButterworth/julia that referenced this pull request Feb 8, 2026
…ontrols

Run package precompilation in a background task, with a monitor task that
streams output and handles keyboard input. This enables users to detach
from precompilation (letting it continue silently) and reattach later.

Keyboard controls during precompilation:
- 'c' cancels all subprocesses (SIGKILL)
- 'd' detaches from monitoring (when detachable=true)
- 'i' sends a profiling signal (SIGINFO/SIGUSR1) for profile peek
- Ctrl-C interrupts subprocesses (SIGINT) and shows output

Signal broadcasting uses per-subprocess Channel{Int32} registered in
BACKGROUND_PRECOMPILE.signal_channels. The keyboard handler broadcasts
to all channels, and per-process tasks forward signals via kill().

Adds a detachable::Bool keyword to precompilepkgs, and background control
functions: monitor_background_precompile, stop_background_precompile,
is_precompiling_in_background.

The Pkg.jl side of this change is in JuliaLang/Pkg.jl#4602.

Co-Authored-By: Claude <noreply@anthropic.com>
IanButterworth added a commit to IanButterworth/julia that referenced this pull request Feb 8, 2026
…ontrols

Run package precompilation in a background task, with a monitor task that
streams output and handles keyboard input. This enables users to detach
from precompilation (letting it continue silently) and reattach later.

Keyboard controls during precompilation:
- 'c' cancels all subprocesses (SIGKILL)
- 'd' detaches from monitoring (when detachable=true)
- 'i' sends a profiling signal (SIGINFO/SIGUSR1) for profile peek
- Ctrl-C interrupts subprocesses (SIGINT) and shows output

Signal broadcasting uses per-subprocess Channel{Int32} registered in
BACKGROUND_PRECOMPILE.signal_channels. The keyboard handler broadcasts
to all channels, and per-process tasks forward signals via kill().

Adds a detachable::Bool keyword to precompilepkgs, and background control
functions: monitor_background_precompile, stop_background_precompile,
is_precompiling_in_background.

The Pkg.jl side of this change is in JuliaLang/Pkg.jl#4602.

Co-Authored-By: Claude <noreply@anthropic.com>
IanButterworth added a commit to IanButterworth/julia that referenced this pull request Feb 8, 2026
…ontrols

Run package precompilation in a background task, with a monitor task that
streams output and handles keyboard input. This enables users to detach
from precompilation (letting it continue silently) and reattach later.

Keyboard controls during precompilation:
- 'c' cancels all subprocesses (SIGKILL)
- 'd' detaches from monitoring (when detachable=true)
- 'i' sends a profiling signal (SIGINFO/SIGUSR1) for profile peek
- Ctrl-C interrupts subprocesses (SIGINT) and shows output

Signal broadcasting uses per-subprocess Channel{Int32} registered in
BACKGROUND_PRECOMPILE.signal_channels. The keyboard handler broadcasts
to all channels, and per-process tasks forward signals via kill().

Adds a detachable::Bool keyword to precompilepkgs, and background control
functions: monitor_background_precompile, stop_background_precompile,
is_precompiling_in_background.

The Pkg.jl side of this change is in JuliaLang/Pkg.jl#4602.

Co-Authored-By: Claude <noreply@anthropic.com>
@IanButterworth IanButterworth force-pushed the ib/background_precompile branch from e8ee7e0 to 1f04fd4 Compare February 11, 2026 14:37
Co-Authored-By: Claude <noreply@anthropic.com>
@IanButterworth IanButterworth force-pushed the ib/background_precompile branch from 1f04fd4 to e1e9cab Compare April 1, 2026 13:47
@IanButterworth IanButterworth marked this pull request as ready for review April 1, 2026 17:12
@IanButterworth IanButterworth merged commit 359cab7 into JuliaLang:master Apr 1, 2026
16 of 46 checks passed
@github-project-automation github-project-automation bot moved this from New to Done in Pkg.jl Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Pkg.precompile() needs to be moved to background task

3 participants