Closed sandfox closed 7 years ago
make a factory for pool
why this?
change acquire to return a promise make drain return a promise make destroyAllNow return promise
❤️
make and expose Error classes???
👍
Please consider a pre-release, I would be happy to use the promises in a new project atm :)
Awesome! How can I help?
make generic "collection" thing that supports indexes and use it power PooledResourceCollection (like Deferred does ResourceRequest)
What do you mean by this? I always favor ES6 collections
@felixfbecker
make a factory At some point I'd like to make the
Pool
class less responsible for instantiating it's own dependencies so that easier for people to replace various implementations of things, and also allows internal changes to be made more easily without breaking the external API.make generic "collection" thing that supports indexes and use it power PooledResourceCollection (like Deferred does ResourceRequest)
I'm already using Set
/Map
etc but In some case I need to index the contents of a those collections by some other key. If you look at PooledResourceCollection
you might see what I mean. (although I have just changed the internals a bit so exact use-case might have gone!)
Please consider a pre-release, I would be happy to use the promises in a new project atm :) the v3 branch
v3-alpha
is available on npm under thenext
tagnpm install [--save] generic-pool@next
I'll try to keep the npm
next
version up to date with thev3-alpha
branch as much as possible. I'm also going to probably add/remove/re-arrange the todo list above a bit. it was just a brain dump.
There is one breaking change the current v3 api I'm going to make soon, and that is to have release
/destroy
return a promise. Other than that I think it's pretty fixed API wise, but open to suggestions.
@felipou The biggest/most useful thing would be if you could try using this new version anywhere. I'd like to iron out the external API as much as possible so that v3 can be released, internals can be fixed/changed later.
In terms of work there the tests and the documentation is still patchy and a mess, and something does need to be done about examples and I want to write a migration guide somewhere to help people move from v2 - I know some people are going to dislike the promise change and I want to show them various ways they can adapt to it, or at least inter-op their callback code with it.
this is now released... let the bugs roll in :-p
TODOs and DREAMS:
Release blockers
destroy
/release
return promises to userlandNice to do before release
generic-pool@2
constructor argspool.stop
function that wrapspool.drain
+pool.clear
Can wait till after release
make generic "collection" thing that supports indexes and use it power PooledResourceCollection (like Deferred does ResourceRequest)Future thoughts/ideas
acquire
calls ???? (this probably depends on cancellable promises and factory.* functions becoming a thing!)