You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice if objects could be created and/or recycled ahead of time. I don't plan on making this feature mandatory but rather add some additional methods that can be used by 3rd party code to modify the pool state.
I would like the code that performs the ahead of time creation/recycling to work with public exposed APIs of the pool rather than being part of the pool implementation itself.
For that to work the pool will need at least one new method that provides access to the currently queued objects without removing them from the pool. For objects not part of the pool a new sync pre_return hook could be added that can be used to filter out objects. This hook could then either spawn a new async task taking ownership of the Object and call Object::take in order to discard it.
The text was updated successfully, but these errors were encountered:
I would also like this. For example if the max_size has not yet been reached, it would be great to have 1 additional and unused connection ready to handle any incoming requests if other connections in the pool are busy.
It would be nice if objects could be created and/or recycled ahead of time. I don't plan on making this feature mandatory but rather add some additional methods that can be used by 3rd party code to modify the pool state.
This future should be opt-in and not enabled by default as highly contested pools with large loads already perform exceptionally well. See https://github.com/bikeshedder/async-pool-benchmark
I would like the code that performs the ahead of time creation/recycling to work with public exposed APIs of the pool rather than being part of the pool implementation itself.
For that to work the pool will need at least one new method that provides access to the currently queued objects without removing them from the pool. For objects not part of the pool a new sync
pre_return
hook could be added that can be used to filter out objects. This hook could then either spawn a new async task taking ownership of theObject
and callObject::take
in order to discard it.The text was updated successfully, but these errors were encountered: