Ali Naci Erdem

Personal Blog

  • Computers
  • DIY
  • GitHub
  • LinkedIn
  • itch.io
  • Support Me

redux-saga

The problem with async generators

21st January 2020 / 1 Comment

Let’s imagine that we want to manage cancellation of an async operation using generator functions in javascript. When a secondary event occurs, we can listen for it and force the generator function to return by calling its return method and handle cleanup in the finally block, which will always run before a generator returns. Say … [Read more…]

Posted in: Computers Tagged: async, cancel, cancellation, generator, iterator, JavaScript, js, promise, race, redux-saga, yield