Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/src/_changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ CurrentModule = DistributedNext
This documents notable changes in DistributedNext.jl. The format is based on
[Keep a Changelog](https://keepachangelog.com).

## Unreleased

### Fixed
- Backported various fixes from Distributed ([#25]).
- Fixed a lingering task that could cause hangs when exiting Distributed ([#51]).

## [v1.1.0] - 2025-08-02

### Fixed
Expand Down
17 changes: 6 additions & 11 deletions src/DistributedNext.jl
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,10 @@ include("pmap.jl")
include("managers.jl") # LocalManager and SSHManager
include("precompile.jl")

_stdlib_watcher_timer::Union{Timer, Nothing} = nothing

function __init__()
global _stdlib_watcher_timer
init_parallel()

if ccall(:jl_generating_output, Cint, ()) == 0
Expand All @@ -141,20 +144,12 @@ function __init__()
# cluster cookie has been set, which is most likely to have been done
# through Distributed.init_multi() being called by Distributed.addprocs() or
# something.
watcher_task = Threads.@spawn while true
_stdlib_watcher_timer = Timer(0; interval=1) do timer
if _check_distributed_active()
return
end

try
sleep(1)
catch
# sleep() may throw when the internal object it waits on is closed
# as the process exits.
return
close(timer)
end
end
errormonitor(watcher_task)
atexit(() -> close(_stdlib_watcher_timer))
end
end

Expand Down
5 changes: 3 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ include(joinpath(Sys.BINDIR, "..", "share", "julia", "test", "testenv.jl"))

cmd = `$test_exename $test_exeflags`

# LibSSH.jl currently only works on unixes
if Sys.isunix()
# LibSSH.jl currently only works on unixes, and the latest release currently
# doesn't pass CI on MacOS.
if Sys.islinux()
# Run the SSH tests with a single thread because LibSSH.jl is not thread-safe
sshtestfile = joinpath(@__DIR__, "sshmanager.jl")
if Base.VERSION >= v"1.12-"
Expand Down
Loading