Skip to content

Support selector finally function. #89

Description

@izaakschroeder

There are sometimes resources attached to a connection that need cleaning up – e.g. database connection that's been checked out from a pool.

createSelector(getA, getB, getC, async (a, b, c) => {
  return await dbPool.checkout(); // how to clean up this connection?
});

Possible option:

createSelector(getA, getB, getC, async (a, b, c) => {
  return await dbPool.checkout();
}).withDisposer(async (a, b, c, con) => {
  return await dbPool.release(con);
});

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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