Git Product home page Git Product logo

Comments (3)

laverdet avatar laverdet commented on July 18, 2024
  1. Use Fiber.yield() instead of yield() if you want to pass overly-strict lints, or if you are actually using strict mode.
  2. There is no reason this would fail. Are you sure you are running inside a fiber? You didn't even paste the error, man.

The sleep function included in the documentation is just an example of how to get started with fibers. I'm not sure why anyone would actually need to use it line-by-line in their own project. Also fibers-promise is a wrapper built on top of fibers. You are using fibers-promise just as much as you are using fibers ;)

from node-fibers.

tomjacobs avatar tomjacobs commented on July 18, 2024

Okay I just tested it again and now it's working - of course. The only thing I can say is (A) I tried this before 2 or 3 times and it didn't work. (B) I hadn't been npm up -ing regularly, and I just did last friday. Maybe that solved the problem.

I do actually have a requirement for a sleep function in my project: I am functionality for adding / deleting data in a database. Because this functionality is async, there can be timing issues...

Anyway, just want to say thank you, and apologize if I have ruffled feathers. I am using Fibers/Promise a ton, and I really really like it

from node-fibers.

laverdet avatar laverdet commented on July 18, 2024

Cool, glad everything is working!

from node-fibers.

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.