Skip to content

Execution context being lost after using FutureConverters #179

Open
@syzboy

Description

@syzboy

override def thenApply[U](fn: JF[_ >: T, _ <: U]): CompletableFuture[U] = thenApplyAsync(fn)

After converting a scala future to a java future, the synchronous functions are implemented by calling async ones.
And it's not using the ones that are taking the extra executor parameter. https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html#thenApplyAsync-java.util.function.Function-

In this case, thread local values will be lost including the execution context

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