Closed rndnoise closed 5 years ago
Hi @rndnoise,
Good catch! I see that we can have newPool
just in Effect
by droping liftEffect
from it. I'm not sure why we are wrapping it in Aff
;-)
I can incorporate this change myself because we are expecting a new release this week but if you want to play with the lib you are more than welcome to provide a PR :-)
Great! I'll look forward to the release :-)
This is done on master
so I'm adding this to v3.0.0
milestone and closing this issue :-)
This may be more trouble than it's worth, but I wish
newPool
returned simplyEffect Pool
rather thanAff Pool
(or that there were two functions). This seems necessary in some cases, for instance to initialize the Pool a single time before passing it to router withHTTPure
:The workaround I'm using is to pass
PoolConfiguration
torouter
and callingnewPool
inside, but I'm not sure if that does what I want. It seems this would result in a separate pool for each request, rather than a single one shared among requests. Looking at thepg-pool
library, it seems thatpg.Pool(...)
calls a constructor and doesn't return a promise.If you agree and prefer to have someone submit a PR, I would be happy to submit one. Though I think most of the work is deciding whether to change
newPool
's return type, or to create a new function.