Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC]: Refactor mapFunAsync to Include Status Tracking #5800

Open
3 tasks done
Bhumika-00 opened this issue Mar 5, 2025 · 2 comments · May be fixed by #6548
Open
3 tasks done

[RFC]: Refactor mapFunAsync to Include Status Tracking #5800

Bhumika-00 opened this issue Mar 5, 2025 · 2 comments · May be fixed by #6548

Comments

@Bhumika-00
Copy link

Description

This RFC proposes refactoring the mapFunAsync function in @stdlib/utils-async-map-function to return an object that allows querying the status of in-flight asynchronous operations. This aligns with the goal of achieving feature parity with async.js while improving observability of async execution states.

Related Issues

Related issues #9 which states that we need to achive parity with async.js.
Changes:

Modified mapFunAsync to return an object containing:

status: Tracks the state (pending, completed, or error).

getStatus(): Method to retrieve the current state.

cancel(): Method to cancel execution (if applicable in the future).

Updated tests to validate the new behavior.

Updated documentation to reflect the API changes.

Motivation:
This refactor improves the usability of mapFunAsync by enabling users to track ongoing async operations, which is particularly useful in long-running tasks or when debugging async workflows.
@kgryte @Planeshifter @steff456

Questions

No.

Other

No.

Checklist

  • I have read and understood the Code of Conduct.
  • Searched for existing issues and pull requests.
  • The issue name begins with RFC:.
@stdlib-bot
Copy link
Contributor

👋 Hi there! 👋

And thank you for opening your first issue! We will get back to you shortly. 🏃 💨

@Bhumika-00
Copy link
Author

Should I start working on this issue??

@devesssi devesssi linked a pull request Apr 4, 2025 that will close this issue
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants