Skip to content

proposal: testing: add TB.SetGOMAXPROCS  #62020

Open
@sivchari

Description

@sivchari

I propose adding a SetGOMAXPROCS. This idea is inspired by TB.Setenv.

As seen Go source codes, too, if it sets GOMAXPROCS and it unsets this value after cleanup, we must write the following ways.

defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(n))
prev := runtime.GOMAXPROCS(n)
defer runtime.GOMAXPROCS(prev)

The writing style is general, if you know Go specification. But I think we can provide better way to achieve.

I submitted a CL. If this CL isn't been necessary, I don't mind to close it. Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Incoming

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions