Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ashleighadams/coroutinescheduler
Low allocation coroutines with tightly controlled concurrency
https://github.com/ashleighadams/coroutinescheduler
await-async concurrency coroutines dotnet scheduler
Last synced: 4 days ago
JSON representation
Low allocation coroutines with tightly controlled concurrency
- Host: GitHub
- URL: https://github.com/ashleighadams/coroutinescheduler
- Owner: AshleighAdams
- License: mit
- Created: 2022-04-12T10:02:54.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-12-01T11:05:42.000Z (about 1 month ago)
- Last Synced: 2024-12-31T12:09:53.196Z (8 days ago)
- Topics: await-async, concurrency, coroutines, dotnet, scheduler
- Language: C#
- Homepage:
- Size: 147 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# CoroutineScheduler
[![CoroutineScheduler][coroutinescheduler-badge]][coroutinescheduler-link] [![CoroutineScheduler.Core][coroutinescheduler-core-badge]][coroutinescheduler-core-link]
[![Codecov][codecov-badge]][codecov-link] [![Mutation testing score][mutation-testing-badge]][mutation-testing-link]Low allocation coroutines with tightly controlled concurrency.
## Usage
Add the following to your `Directory.Build.props` or `csproj`:
```xml
```
```csharp
using CoroutineScheduler;var scheduler = new Scheduler();
// spawn a coroutine
scheduler.SpawnTask(MyCoroutine);while (true)
scheduler.Resume();async Task MyCoroutine()
{
int i = 0;
while (true)
{
Console.WriteLine($"Hello {i++}");
await scheduler.Yield();
}
}
```[coroutinescheduler-badge]: https://img.shields.io/nuget/v/CoroutineScheduler?label=CoroutineScheduler
[coroutinescheduler-link]: https://www.nuget.org/packages/CoroutineScheduler
[coroutinescheduler-core-badge]: https://img.shields.io/nuget/v/CoroutineScheduler.Core?label=CoroutineScheduler.Core
[coroutinescheduler-core-link]: https://www.nuget.org/packages/CoroutineScheduler.Core
[codecov-badge]: https://codecov.io/gh/AshleighAdams/CoroutineScheduler/branch/master/graph/badge.svg?token=ZE1ITHB3U3
[codecov-link]: https://codecov.io/gh/AshleighAdams/CoroutineScheduler
[mutation-testing-badge]: https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2FAshleighAdams%2FCoroutineScheduler%2Fmaster
[mutation-testing-link]: https://dashboard.stryker-mutator.io/reports/github.com/AshleighAdams/CoroutineScheduler/master