Skip to content

Conversation

devesssi
Copy link

@devesssi devesssi commented Apr 4, 2025

Resolves #5800

Description

What is the purpose of this pull request?

This pull request:

  • Implements the @stdlib/utils-async-map-function module with enhanced functionality to track async operation status
  • Adds a new mapFunAsync function that returns a status object with getStatus() and cancel() methods
  • Provides feature parity with async.js and improves observability of async execution states
  • Includes comprehensive tests, benchmarks, and documentation

Related Issues

Does this pull request have any related issues?

This pull request:

Questions

Any questions for reviewers of this pull request?

No.

Other

The implementation includes:

  • A status object that tracks the operation state (pending, completed, error)
  • Methods to query the current state and cancel operations
  • Comprehensive test suite covering edge cases and error scenarios
  • Performance benchmarks for different array sizes
  • Example usage demonstrating the new functionality

Checklist

Please ensure the following tasks are completed before submitting this pull request.

  • Read, understood, and followed the contributing guidelines.
  • Added comprehensive test suite
  • Added benchmarks for performance testing
  • Added example usage
  • Added documentation with JSDoc comments
  • Added license headers to all files
  • Followed project code style guidelines
  • All tests passing
  • No linting errors

@stdlib-js/reviewers

@stdlib-bot stdlib-bot added Math Issue or pull request specific to math functionality. First-time Contributor A pull request from a contributor who has never previously committed to the project repository. Needs Review A pull request which needs code review. labels Apr 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
First-time Contributor A pull request from a contributor who has never previously committed to the project repository. Math Issue or pull request specific to math functionality. Needs Review A pull request which needs code review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RFC]: Refactor mapFunAsync to Include Status Tracking
2 participants