zero-backpressure-semaphore-typescript

Promise Semaphore for Node.js projects, inspired by the RAII idiom. Offering backpressure control for enhanced efficiency, utilizing a communicative API that signals availability. Additionally, it features a modern API and incorporates mechanisms for graceful termination and error handling.

MIT License

Downloads
270
Stars
0
zero-backpressure-semaphore-typescript - Unit Tests and README improvements Latest Release

Published by ori88c about 1 month ago

Key Features

  • Refactor Unit Tests: change indentation to 2 spaces, improve readability and terminology consistency. Additionally, expand coverage of the waitForAllExecutingJobsToComplete method.
  • README: Add section on the misleading promise-pool terminology commonly used to describe promise semaphores.
zero-backpressure-semaphore-typescript - README and package.json improvements

Published by ori88c 2 months ago

Key Features

  • README and package.json improvements.
zero-backpressure-semaphore-typescript - README and Docs improvements

Published by ori88c 2 months ago

Key Features

  • README and Docs improvements.
zero-backpressure-semaphore-typescript - README and Docs improvements

Published by ori88c 2 months ago

Key Features

  • README and Docs improvements.
zero-backpressure-semaphore-typescript - README and Docs improvements

Published by ori88c 3 months ago

Key Features

  • README refinements.
  • Improved docs for method waitForAvailability.
  • Slight refactor: replacing null with undefined, on available slots.
zero-backpressure-semaphore-typescript - Target compatibility has been upgraded from ES6 to ES2020

Published by ori88c 3 months ago

Key Features

  • Target compatibility has been upgraded from ES6 to ES2020. This change was made to leverage the widespread adoption of ES2020, its native support for async/await, and the use of Promise.allSettled within the semaphore.
zero-backpressure-semaphore-typescript - Terminology update, and refined comments in tests.

Published by ori88c 3 months ago

Key Features

  • Terminology: The 'rooms' terminology was replaced with 'slots', which is more common.
  • Tests: A few comments were improved, for enhanced readability.
zero-backpressure-semaphore-typescript - README and Docs improvements

Published by ori88c 4 months ago

Key Features

  • README improvements: Clarifying that waitForAvailability is optional, and demonstrating how the same effect can be achieved via startExecution alone.
  • Enhancing a few method docs.
zero-backpressure-semaphore-typescript - Renaming method waitTillAllExecutingJobsAreSettled to waitForAllExecutingJobsToComplete for improved readability

Published by ori88c 4 months ago

Key Features

  • The only breaking change in this release is the renaming of method waitTillAllExecutingJobsAreSettled to waitForAllExecutingJobsToComplete for improved readability.
  • README improvements.
zero-backpressure-semaphore-typescript - Introducing a new method: waitForAvailability

Published by ori88c 4 months ago

Key Features

  • Adding a new method waitForAvailability. Please note, this method is not commonly required. However under some cases, it may be a useful preliminary action before startExecution. Especially whenever there's a motive that startExecution will start immediately, for example due to working with a message-queue that has a tight timeout constraint.
zero-backpressure-semaphore-typescript - README enhancements

Published by ori88c 4 months ago

Key Features

  • README enhancements:
    • Clarifying the space complexity implications of no backpressure control.
    • Adding a message queue example.
zero-backpressure-semaphore-typescript - Adding unit test that verifies correctness of the room-acquire mechanism

Published by ori88c 4 months ago

Key Features

  • Added a unit test to verify the correctness of the room-acquire mechanism. This mechanism was previously covered indirectly by existing tests, but now receives direct attention.
zero-backpressure-semaphore-typescript - Robust Error Handling for Uncaught Errors from Background Jobs

Published by ori88c 4 months ago

Key Features

  • Robust Error Handling:
    • Uncaught errors from background jobs triggered by startExecution are now captured.
    • Access these errors using the extractUncaughtErrors method.
    • Check the number of accumulated uncaught errors with the amountOfUncaughtErrors getter method.
    • Note: Prior to version v1.1.0, these errors were ignored, making them inaccessible to users. However, even in v1.0.X versions, such errors did not propagate to the event loop, therefore could not crash the application.
zero-backpressure-semaphore-typescript - README enhancements, readability improvements

Published by ori88c 4 months ago

Key Features

  • README: adding a real-world example on which reducing backpressure is desired.
  • Implementation: readability improvements.
zero-backpressure-semaphore-typescript - README refinements

Published by ori88c 4 months ago

Key Features

  • README refinements.
zero-backpressure-semaphore-typescript - README refinements

Published by ori88c 4 months ago

Key Features

  • README refinements.
zero-backpressure-semaphore-typescript - Dev-dependencies update, tiny test enhancement

Published by ori88c 4 months ago

Key Features

  • Dev dependencies update.
  • Tiny test enhancement.
  • Typo fix in thrown error.
zero-backpressure-semaphore-typescript - README refinements, dev-dependencies update

Published by ori88c 4 months ago

Key Features

  • README refinements.
  • Dev dependencies update.
zero-backpressure-semaphore-typescript - README and Docs enhancements

Published by ori88c 4 months ago

Key Features

  • README and Docs enhancements.
zero-backpressure-semaphore-typescript - Docs refinements

Published by ori88c 4 months ago

Changes

  • README and docs refinements.