Comments (5)
It is incompatible with flow control libraries like "node-seq". Simply it recognizes returned object as error.
In my opinion we (as programmers) should have an option to turn off that behavior.
from node-pool.
Ok, I just committed a patch that removes adjustCallback() -- I haven't pushed this to npm yet. If you have time, please grab this change from master and try it in your app and let me know if it works. If so I'll release this as 2.0.0 (to indicate that the change is not backwards compatible).
from node-pool.
Sorry for my "lag" in response but I was really busy.
BTW Of course it works for me! :)
But I found a slightly strange case. Function "createResource" attempt to make something "similar" to "adjustCallback".
var Pool = require('generic-pool');
var p = Pool.Pool({
name: "mysql",
create: function (callback) {
var o = {'test':1};
callback(o);
},
destroy: function (client) {
},
max: 20,
idleTimeoutMillis: 100
});
p.acquire(function(error) {
console.log(arguments); // 0 = null, 1 - my test object
});
Are You really sure that is correct and expected (for everyone) behavior?
from node-pool.
After longer reflection I think the above behavior is correct :)
from node-pool.
Ok, great. I just published a 2.0.0 release to npm.
thanks!
-- James
On Wed, Jul 25, 2012 at 11:49 PM, Łukasz Kużyński <
[email protected]
wrote:
After longer reflection I think the above behavior is correct :)
Reply to this email directly or view it on GitHub:
#32 (comment)
James Cooper
http://blog.bitmechanic.com/
from node-pool.
Related Issues (20)
- Issue after upgrading generic-pool from 2.4.2 to 3.7.1
- Im not getting any performance using a pool connection vs reusing one connection
- waitingClientsCount function has disappeared HOT 1
- resource release not getting called HOT 2
- NPM installation faliure HOT 2
- Add param to factory
- Feature: add pool.use method. HOT 1
- Borrowed resources never go higher than 1 HOT 2
- Share pool between servers in a cluster HOT 3
- How to work maxWaitingClients? HOT 1
- Add destroy timeout to prevent pool.clear from hanging when destroy promise never resolves HOT 4
- testOnReturn = no-op?
- What does happen if I don't release the resource and close the node? HOT 2
- Resource not currently part of this pool HOT 1
- `ready` method from Pool is missing from the TS definitions (v3.8.2)
- .use does not handle synchronous work functions
- Consistently occuring `ResourceRequest timed out` Error HOT 1
- TimeoutError: ResourceRequest timed out HOT 2
- Suggested Feature: borrowTimeoutMillis HOT 2
- Pool does not maintain the minimum HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-pool.