Skip to content

Thread pool of main thread varies depending on how Julia is started #53389

Closed
@carstenbauer

Description

@carstenbauer

Depending on whether Julia is started with or without interactive threads, the main thread is in either the interactive or default threadpool:

cb@mm ~
➜ julia -t 3 -E 'Threads.threadpool()'
:default

cb@mm ~
➜ julia -t 3,1 -E 'Threads.threadpool()'
:interactive

I find this surprising. Is this intentional? If so, what is the reasoning behind this?

Note that this is wrongly documented since 1.9 (I created a doc fix PR).

Came up in this issue and also seems to be causing problems (see discourse.julialang.org/t/what-is-julia-doing-with-your-threads/110052/20 and the related issue #53269).

Metadata

Metadata

Assignees

No one assigned

    Labels

    multithreadingBase.Threads and related functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions