Skip to content

[Distributed] don't sidestep require logic #26813

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

Merged
merged 1 commit into from
Aug 2, 2018
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
2 changes: 1 addition & 1 deletion stdlib/Distributed/src/Distributed.jl
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function _require_callback(mod::Base.PkgId)
@sync for p in procs()
p == 1 && continue
@async remotecall_wait(p) do
Base._require(mod)
Base.require(mod)
nothing
end
end
Expand Down
17 changes: 17 additions & 0 deletions stdlib/Distributed/test/distributed_exec.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,23 @@ include(joinpath(Sys.BINDIR, "..", "share", "julia", "test", "testenv.jl"))
addprocs_with_testenv(4)
@test nprocs() == 5

# distributed loading of packages

# setup
@everywhere begin
old_act_proj = Base.ACTIVE_PROJECT[]
pushfirst!(Base.LOAD_PATH, "@")
Base.ACTIVE_PROJECT[] = joinpath(Sys.BINDIR, "..", "share", "julia", "test", "TestPkg")
end

@everywhere using TestPkg
@everywhere using TestPkg

@everywhere begin
Base.ACTIVE_PROJECT[] = old_act_proj
popfirst!(Base.LOAD_PATH)
end

@everywhere using Test, Random, LinearAlgebra

id_me = myid()
Expand Down