# TheCodeTraveler/AsyncAwaitBestPractices

Extensions for System.Threading.Tasks.Task and System.Threading.Tasks.ValueTask

Repository: https://github.com/TheCodeTraveler/AsyncAwaitBestPractices
Canonical: https://ross.abutalabs.com/products/asyncawaitbestpractices
Homepage: https://www.nuget.org/packages/AsyncAwaitBestPractices.MVVM/
Language: C#
License: MIT
License Family: permissive
Topics: async, await, icommand, best-practices, task, threading
Last push: 2026-08-19T09:23:02+00:00

## Health v2 (maintenance only)
Score: 72/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 98, release rhythm 24, longevity 100
- inputs: {"age_days": 3144, "days_push": 14, "days_rel": 295, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1839, forks 173 (observed 2026-08-28T04:05:42.928717+00:00)

## What it is
A .NET library providing extensions for System.Threading.Tasks.Task and ValueTask, including SafeFireAndForget for exception-safe fire-and-forget calls and WeakEventManager to avoid memory leaks. It also ships an MVVM companion package with AsyncCommand and AsyncValueCommand implementations of ICommand for async operations.

## Use cases
- safely fire-and-forget a Task without async void
- avoid memory leaks from un-unsubscribed event handlers
- bind async Task-based commands in MVVM
- use ValueTask with ICommand in WPF or MAUI apps
- catch exceptions from unobserved tasks
- replace async void event handlers in C#

## When to choose
- you write C#/.NET apps with async code and want to avoid async void pitfalls
- you need async ICommand implementations for MVVM (Xamarin, MAUI, WPF, Avalonia)
- you want a lightweight, .NET Standard 1.0-compatible utility

## When to avoid
- your project is not on .NET/.NET Standard
- you need full async/await orchestration libraries like TPL Dataflow or Rx
- you don't use MVVM or fire-and-forget patterns

## Facets
- artifact type: library
- maturity: stable
- function: concurrency, error-handling, developer-tools
- domain: developer-tools, cross-platform
- platform: dotnet, cross-platform
- tags: async, await, task, valuetask, icommand, mvvm, fire-and-forget, weak-event-manager, csharp, nuget

## Member repositories
- TheCodeTraveler/AsyncAwaitBestPractices (main) score 72

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:42.928717+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:18:06.217338+00:00, confidence not recorded.
  - readme: https://github.com/TheCodeTraveler/AsyncAwaitBestPractices (fetched 2026-08-28T04:05:42.928717+00:00, sha 259797e7249c)
  - homepage: https://www.nuget.org/packages/AsyncAwaitBestPractices.MVVM/ (fetched 2026-08-29T10:57:16.357827+00:00, sha 328919ddd143)
  - site_page: https://www.nuget.org/policies/About (fetched 2026-08-29T10:57:16.367193+00:00, sha a113b8a074c9)
- Data as of 2026-08-30T08:39:29.467469+00:00.
