Skip to content

repeated threads loop hangs on windows #32087

Closed
@JeffBezanson

Description

@JeffBezanson

Calling this function on windows:

function f()
    nt = Threads.nthreads()
    for k in 1:5
        v = zeros(32 * nt)
        Threads.@threads for n in 1:nt
            for i in 1:100000000
                v[32 * n] += i
            end
        end
        @show k, v[32 .* (1:nt)]
    end
end

with JULIA_NUM_THREADS > 1 ends up hanging, using 100% of one CPU. It sometimes gets through some iterations of the outer loop first. Can anybody reproduce this? Works fine on linux.

Metadata

Metadata

Labels

multithreadingBase.Threads and related functionalityregressionRegression in behavior compared to a previous versionsystem:windowsAffects only Windows

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions