Skip to content

Threads.@threads doesn't compose with ThreadProc #249

Open
@tbenst

Description

@tbenst

I may be missing something, but it doesn't seem like ThreadProc is doing anything..?

using Dagger
import Dagger: @par

function count_threads()
    n = Threads.nthreads()
    a = zeros(n)
    Threads.@threads for i = 1:n
           a[i] = Threads.threadid()
    end
    a
end
procutil=Dict(Dagger.ThreadProc => 36.0)
x = @par procutil=procutil count_threads()
length(unique(collect(x))) # returns 1.0
length(unique(count_threads())) # return 36.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions