https://github.com/svermeulen/uniscon
A simple implementation of structured concurrency for Unity game engine
https://github.com/svermeulen/uniscon
Last synced: 3 months ago
JSON representation
A simple implementation of structured concurrency for Unity game engine
- Host: GitHub
- URL: https://github.com/svermeulen/uniscon
- Owner: svermeulen
- License: mit
- Created: 2024-02-16T09:32:16.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-20T09:25:53.000Z (over 1 year ago)
- Last Synced: 2025-02-26T22:08:42.529Z (3 months ago)
- Language: C#
- Size: 26.4 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Uniscon
## Structure Concurrency for Unity Game Engine
Uniscon brings the concepts of [Structured Concurrency](https://en.wikipedia.org/wiki/Structured_concurrency) to Unity. The name is a portmanteau of this (**UN**Ity **S**tructured **CON**currency).
This programming paradigm was first popularized by the python library [Trio](https://github.com/python-trio/trio) and Uniscon attempts to mirror these concepts in C#
If you aren't familiar with Trio - then in short, Structured Concurrency makes asynchronous tasks an order of magnitude easier to manage. It achieves this by making the structure of code match the hierarchical structure of the async operations, which results in many benefits.
Installation
---1. The package is available on the [openupm registry](https://openupm.com). It's recommended to install it via [openupm-cli](https://github.com/openupm/openupm-cli).
2. Execute the openum command.
- ```
openupm add com.svermeulen.uniscon
```Usage
---For usage see the tests at `TestTaskNursery.cs`.
Notes
---* Not thread safe. Assumption is that you're using it from unity main thread. Currently unclear how this will be handled in the future when we want multi thread support