question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Return a promise from task.start()

See original GitHub issue

What do you think if task.start() function would return a promise which could be fulfilled with task’s results or rejected in case of error?

In some scenarios, it’s more preferable rather than tracking task’s pending/result values, i.e. const { pending, error, result } = task;

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
dai-shicommented, Oct 18, 2019
0reactions
denisborovikovcommented, Oct 17, 2019

@dai-shi Thank you for the quick reply and fast update! I very much appreciate your work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using promises - JavaScript - MDN Web Docs
Essentially, a promise is a returned object to which you attach callbacks, instead of passing callbacks into a function. Imagine a function, ...
Read more >
Promise equivalent in C# - Stack Overflow
I just have an access to a handler that will be run on another thread. c# · promise · async-await · task ·...
Read more >
Difference between a Promise and a Task
Once you have a Promise instance the action has already started. Task instance does not run until someone calls .fork().
Read more >
promiseDAG
When task 1 and task 2 are finished, the function task3 is called to start the 3rd task, and it gets the return...
Read more >
25. Promises for asynchronous programming
Promise reactions are callbacks that you register with the Promise method then() , to be notified of a fulfillment or a rejection. A...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found