Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

[domain] [feat-req] domain.run function with parameters #7193

Closed
@micnic

Description

@micnic

It would be great to be able to define the parameters for the function that is called inside the domain.run(fn) method.

I propose this API change:
domain.run(fn, [arg1], [arg2], [...])

An example of use:

function justDoSomething(a, b, c) {
    /* do something else */
    return a + b + c;
}

mathDomain.run(justDoSomething, 1, 2, 3);

This approach would allow to use values from the current context and run a function that is outside of this context as it is implemented in setTimeout() or setInterval().

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions