UNPKG

@tscommon/synchronized

Version:

In an async environment, a race condition occurs when two or more async operations attempt to update mutable shared data at the same time. @synchronized decorator offers a mechanism to avoid race conditions by synchronizing async operations access to shar

6 lines (3 loc) 534 B
# [Synchronized](https://tscommon.github.io/monorepo/packages/synchronized) - [API](https://tscommon.github.io/monorepo/api/synchronized) [![codecov](https://codecov.io/gh/tscommon/monorepo/graph/badge.svg?token=I222OQNV9L)](https://codecov.io/gh/tscommon/monorepo) In an async environment, a race condition occurs when two or more async operations attempt to update mutable shared data at the same time. `@synchronized` decorator offers a mechanism to avoid race conditions by synchronizing async operations access to shared data.