# The Highs.jl's API \`Highs\_resetGlobalScheduler\` is not very clear

**URL:** <https://discourse.julialang.org/t/the-highs-jls-api-highs-resetglobalscheduler-is-not-very-clear/143263>\
**Category:** Optimization (Mathematical)\
**Created:** [November 28, 2026, 1:42am UTC](https://discourse.julialang.org/t/the-highs-jls-api-highs-resetglobalscheduler-is-not-very-clear/143263 "2026-11-28T01:42:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zchenytt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zchenytt/32/223795_2.png) [@zchenytt](https://discourse.julialang.org/u/zchenytt)\
**Post date:** [November 28, 2026, 1:42am UTC](https://discourse.julialang.org/t/the-highs-jls-api-highs-resetglobalscheduler-is-not-very-clear/143263/1 "2026-11-28T01:42:06Z")

</div>

I read this instruction [GitHub - jump-dev/HiGHS.jl: A Julia interface to the HiGHS solver · GitHub](https://github.com/jump-dev/HiGHS.jl#threads) and this related reference [Parallel · HiGHS Documentation](https://ergo-code.github.io/HiGHS/dev/parallel/?utm_source=chatgpt.com#Advanced).

To be honest I don’t find it is well-designed and easy-to-use for users.

The key question is: the API call—`Highs_resetGlobalScheduler(1)` **is too vague**. I don’t know **what inner object it will modify**.

I want to make an analogy: when I first started to learn Julia there was an API call `Random.seed!(1)`, which works. But later on when I start to do more complex projects—using multiple modules, and use multiple threads, that API call turns out to be too vague. A clearly better way of organizing my code is to instantiate an explicit object, e.g. `rng = Random.Xoshiro(1)`. And later on use `rand(rng, Int)` rather than `rand(Int)`. The former style is unambiguous and can thus ensure reproducibility.

Since I used to use Gurobi.jl, it’s also worth mentioning that the same procedure is fairly clear with Gurobi’s APIs. For example, I can write a helper module as follows:

```julia-auto
module GRBhelper

import JuMP, Gurobi

    const GRB_CONFIG = Dict{String,Any}("Threads"=>1,"OutputFlag"=>0)
    Env() = Gurobi.Env(GRB_CONFIG)
    Model() = Model(Env())
    function Env(N::Int)
        v = Vector{Gurobi.Env}(undef, N)
        Threads.@threads for i=eachindex(v)
            v[i] = Env()
        end
        v
    end
    function Model(e::Gurobi.Env)
        m = JuMP.direct_model(Gurobi.Optimizer(e))
        JuMP.set_string_names_on_creation(m, false)
        m
    end
    function Model!(mv::Vector{JuMP.Model}, i, #=with existing ones=# ev::Vector{Gurobi.Env})
        m = JuMP.direct_model(Gurobi.Optimizer(ev[i]))
        JuMP.set_string_names_on_creation(m, false)
        mv[i] = m
    end
    Model!(mv::Vector{JuMP.Model}, #=with existing ones=# ev::Vector{Gurobi.Env}) = Threads.@threads for i=eachindex(mv)
        Model!(mv, i, ev)
    end
end

```

So the workflow is very clear: I at first instantiate a `GRB_env` object, then I build a `JuMP_direct_model`, everything is unambiguously linked together.

I’ve had some preliminary chat with some chatbot and it comments that my concern is very appropriate (particularly concerning my `Random.seed!` analogy). Could we make this part ([GitHub - jump-dev/HiGHS.jl: A Julia interface to the HiGHS solver · GitHub](https://github.com/jump-dev/HiGHS.jl#threads)) more accurate in meaning (e.g. could you help me write a `HiGHShelper` module that imitates the `GRBhelper`)?
