Skip to content

Adds getExecutor to Çlosure #1225

@killme2008

Description

@killme2008

Currently, JRaft uses a single global executor for all closures, including user task closures.

We can add a getExecutor method to the Closure interface:

interface Closure {
    default ExecutorService getExecutor() {
        return null;
    }
}

If this method returns a non-null executor, use it instead of the global executor.

Additionally, we could split executors by task type to improve isolation and performance.

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