# microsoft/vs-threading

The Microsoft.VisualStudio.Threading is a xplat library that provides many threading and synchronization primitives used in Visual Studio and other applications.

Repository: https://github.com/microsoft/vs-threading
Canonical: https://ross.abutalabs.com/products/vs-threading
Homepage: https://microsoft.github.io/vs-threading/
Language: C#
License: NOASSERTION
License Family: other
Topics: threading, synchronization-primitives, ui-thread, analyzer, async, dotnet, nuget, netstandard
Last push: 2026-09-02T18:49:44+00:00

## Health v2 (maintenance only)
Score: 92/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 100, release rhythm 77, longevity 100
- inputs: {"age_days": 3619, "days_push": 0, "days_rel": 72, "gap_med": 60.0, "n_releases_24m": 5}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1040, forks 160 (observed 2026-09-03T02:15:15.083954+00:00)

## What it is
Microsoft.VisualStudio.Threading is a cross-platform .NET library providing async synchronization primitives, async collections, and TPL/dataflow extensions, including the JoinableTaskFactory for safely blocking the UI thread on async work. It ships with a companion Roslyn analyzer package that detects common threading and async coding mistakes.

## Use cases
- safely block the UI thread while awaiting async work
- avoid deadlocks when mixing sync and async code in .NET
- use async-aware locks and synchronization primitives
- detect async/await threading mistakes at compile time
- manage async operations across UI and background threads
- write thread-safe async collections and dataflow pipelines

## When to choose
- building .NET desktop or UI applications with async code that must interact with the UI thread
- you need battle-tested async synchronization primitives with static analysis
- maintaining Visual Studio extensions or similar IDE tooling

## When to avoid
- writing simple backend or console apps where standard Task and SemaphoreSlim suffice
- non-.NET platforms or languages
- you want a lightweight dependency-free threading utility

## Facets
- artifact type: library
- maturity: stable
- function: concurrency, developer-tools
- domain: developer-tools, cross-platform
- platform: dotnet, cross-platform
- tags: async, threading, synchronization-primitives, ui-thread, roslyn-analyzers, csharp, nuget

## Member repositories
- microsoft/vs-threading (main) score 92

## Provenance
- Observed fields: from GitHub, fetched 2026-09-03T02:15:15.083954+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-30T07:03:31.104323+00:00, confidence not recorded.
  - readme: https://github.com/microsoft/vs-threading (fetched 2026-09-03T02:15:15.083954+00:00, sha 7ec28cf8874d)
  - homepage: https://microsoft.github.io/vs-threading/ (fetched 2026-08-29T13:04:13.066178+00:00, sha 9e43ae15575f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
