Giter VIP home page Giter VIP logo

Comments (6)

ryancole avatar ryancole commented on May 5, 2024

Is it because you're using async perhaps, with a lib that naturally handles Promise?

from dataloader.

ErrorPro avatar ErrorPro commented on May 5, 2024

Yes i am using Promise.all! And yes, you are right. But do you see any other ways to handle it? I have an array of IDs, and i need to return a promise for each of IDs.

from dataloader.

idris avatar idris commented on May 5, 2024

@ErrorPro try removing the async on the first line. You don't need it because you're returning Promise.all which is already a promise.

from dataloader.

ErrorPro avatar ErrorPro commented on May 5, 2024

@idris the thing is that i am using Promise.all(promises). It supposed to run all promises async(runs each of promises at the same time). So removing async didn't help me.

from dataloader.

leebyron avatar leebyron commented on May 5, 2024

Could you reduce this to some minimal code that we could run to attempt to reproduce the issue? If there is a race condition than I'd like to include a test to prove it so we can fix it. However right now I'm having trouble recreating the issue you're describing.

from dataloader.

leebyron avatar leebyron commented on May 5, 2024

Closing this issue since it's aging.

If you end up finding an issue where you have some code that could be easily run by someone else that illustrates the problem, then that would help identify a test case to work around.

However my hunch is probably that your usage is incorrect based on mixing async functions with Promises in ways that the language does not expect.

from dataloader.

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.