Git Product home page Git Product logo

Comments (5)

wookieb avatar wookieb commented on July 4, 2024

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.

coopernurse avatar coopernurse commented on July 4, 2024

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.

wookieb avatar wookieb commented on July 4, 2024

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.

wookieb avatar wookieb commented on July 4, 2024

After longer reflection I think the above behavior is correct :)

from node-pool.

coopernurse avatar coopernurse commented on July 4, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.