Skip to content

Commit

Permalink
Update README.md and CONTRIBUTING.md
Browse files Browse the repository at this point in the history
  • Loading branch information
havelessbemore committed May 13, 2024
1 parent 422944a commit 5caeadd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
1 change: 0 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ This project is governed by the [Code of Conduct](./CODE_OF_CONDUCT.md). By cont

## Developing

- `npm run dev`: Start a local test server
- `npm run test`: Run tests
- `npm run test:coverage`: Create coverage reports
- `npm run lint`: Check styleguide adherence
Expand Down
25 changes: 18 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Semafy

**Semafy** provides synchronization and concurrency management across execution agents such as web workers and the main thread. It contains a robust set of tools modeled after C++ synchronization primitives, offering control and flexibility for managing shared resources and states.
**Semafy** provides synchronization and concurrency management across execution agents (main thread, web workers). It contains a robust set of tools modeled after C++ synchronization primitives, offering control and flexibility for managing shared resources and states.

[![Version](https://img.shields.io/npm/v/semafy.svg)](https://www.npmjs.com/package/semafy)
[![Maintenance](https://img.shields.io/maintenance/yes/2024.svg)](https://github.com/havelessbemore/semafy/graphs/commit-activity)
Expand All @@ -11,10 +11,12 @@
## Features

- **Mutexes**: Exclusive and shared locking to protect data from concurrent access.
- **ConditionVariable**: Allows agents (main thread, web workers) to wait for certain conditions to occur.
- **Semaphores**: Control access to a finite number of resources.
- **Error Handling**: Specific classes for various lock-related issues, enhancing debuggability and reliability.
- **Platform Agnostic**: Works in both [browser](#browser-usage) and server-side applications, and generally any environment that supports `SharedArrayBuffer`.
- **ConditionVariable**: Allows agents to wait for certain conditions to occur.
- **Barriers**: Ensures agents reach a certain point before any can proceed.
- **Async Management**: Easily handle async operations with utilities like `tryLock`, `lockGuard`, and `callOnce`.
- **Error Handling**: Specific error classes to enhance debuggability and reliability.
- **Platform Agnostic**: Works in any [browser](#browser-usage) or server-side environment that supports `SharedArrayBuffer`.

## Installation

Expand Down Expand Up @@ -86,7 +88,7 @@ yarn add semafy

### Barriers

- **Latch**: Allows agents to wait until a set of operations has been completed.
- **Latch**: Allows agents to wait until a set of operations has been completed. Ideal for scenarios where multiple tasks must reach a common point before proceeding. For example, the completion of multiple data loading operations before data processing begins.

### Errors

Expand All @@ -104,8 +106,17 @@ yarn add semafy

## Browser Usage

For security reasons, browsers have certain requirements for using shared memory. Please see [SharedArrayBuffer > Security Requirements](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer#security_requirements) for details.
Browser security requirements for using shared memory must be met. Please see [SharedArrayBuffer > Security Requirements](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer#security_requirements) for details.

## Contributing

Contributions are welcome! Please submit any bugs, issues, or pull requests to the [project's GitHub repository](https://github.com/havelessbemore/semafy).

Contributions are welcome!

- **Bug Reports**: Please use the [GitHub issue tracker](https://github.com/havelessbemore/semafy/issues) to report any bugs. Include a detailed description and any relevant code snippets or logs.

- **Feature Requests**: Please submit feature requests as issues, clearly describing the feature and its potential benefits.

- **Pull Requests**: Please ensure your code adheres to the existing style of the project and include any necessary tests and documentation.

For more information, check out the [contributor's guide](https://github.com/havelessbemore/semafy/CONTRIBUTING.md).

0 comments on commit 5caeadd

Please sign in to comment.