Skip to content

Why does Transactor.fromDataSource take an ExecutionContext and a Blocker? #958

@changlinli

Description

@changlinli

It seems like I should only need one of those.

That is if we're worried about doing stuff on the right blocking thread pool, then we use Blocker or we could not use Blocker and just use ExecutionContext as the blocking pool.

Looking at the implementation it looks like getting the DB connection is done on the ExecutionContext, closing the connection is done on Blocker. Is there any reason for this?

If so, perhaps it should be documented in the Scaladoc.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions