Dreamine.Threading.Wpf 1.0.0

dotnet add package Dreamine.Threading.Wpf --version 1.0.0
                    
NuGet\Install-Package Dreamine.Threading.Wpf -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Dreamine.Threading.Wpf" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Dreamine.Threading.Wpf" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Dreamine.Threading.Wpf" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Dreamine.Threading.Wpf --version 1.0.0
                    
#r "nuget: Dreamine.Threading.Wpf, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Dreamine.Threading.Wpf@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Dreamine.Threading.Wpf&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Dreamine.Threading.Wpf&version=1.0.0
                    
Install as a Cake Tool

Dreamine.Threading.Wpf

Dreamine.Threading.Wpf provides WPF monitoring UI components for Dreamine.Threading.

This package displays worker thread status, priority, interval, assigned CPU core, affinity state, job count, cycle count, and fault state inside WPF applications.

➡️ 한국어 문서 보기

Purpose

The core package Dreamine.Threading defines worker threads, polling jobs, scheduling policies, and thread state models.
This package provides WPF UI components for observing those runtime states.

Dreamine.Threading
 └─ Thread state and manager abstractions

Dreamine.Threading.Wpf
 ├─ Thread monitor view
 ├─ Thread monitor view model
 ├─ WPF UI dispatcher
 └─ status/priority converters

Responsibilities

This package is responsible for:

  • displaying registered worker threads
  • displaying thread status and priority
  • displaying interval and assigned CPU core
  • displaying affinity state
  • displaying cycle count and job count
  • displaying last error information
  • refreshing thread monitor data safely on the WPF UI thread
  • keeping WPF-specific code outside the core threading package

Package Structure

Dreamine.Threading.Wpf
├─ Services
│  └─ WpfThreadUiDispatcher.cs
│
├─ ViewModels
│  └─ DreamineThreadMonitorViewModel.cs
│
├─ Views
│  └─ DreamineThreadMonitorView.xaml
│
├─ Converters
│  ├─ ThreadPriorityTextConverter.cs
│  └─ ThreadStatusBrushConverter.cs
│
└─ Registration
   └─ DreamineThreadingWpfRegistration.cs

Thread Monitor View

The monitor view displays thread information in a WPF DataGrid.

Displayed columns:

Name
Status
Priority
Interval
Core
Affinity
Jobs
Cycles
Last Error

The monitor can be used to observe:

  • raw zero-interval workers
  • adaptive zero-interval workers
  • normal polling workers
  • overflow job distribution
  • cycle count differences
  • affinity assignment
  • fault state

Selection Detail Panel

The lower detail panel displays information about the selected worker thread.

Displayed information includes:

Name
Status
Priority
Interval
Core
Affinity
Job Count
Cycle Count
Started At
Stopped At
Last Error

The selection is restored during refresh so that the detail panel remains visible while monitoring updates continue.

WPF UI Dispatching

WpfThreadUiDispatcher ensures that monitor updates are applied on the WPF UI thread.

Background refresh timer
 → IDreamineThreadManager.GetThreadInfos()
 → WpfThreadUiDispatcher.BeginInvoke(...)
 → ObservableCollection update

Registration

Current registration style:

using Dreamine.Threading.Wpf.Registration;

DreamineThreadingWpfRegistration.Register();

This registers:

WpfThreadUiDispatcher
DreamineThreadMonitorViewModel
DreamineThreadMonitorView

This package does not create or control worker threads directly. It only observes IDreamineThreadManager.

Usage

<UserControl
    xmlns:threadingViews="clr-namespace:Dreamine.Threading.Wpf.Views;assembly=Dreamine.Threading.Wpf">

    <threadingViews:DreamineThreadMonitorView />

</UserControl>

When used inside a wrapper page:

<threadingViews:DreamineThreadMonitorView
    DataContext="{Binding ThreadMonitor}" />

Design Notes

This package depends on abstractions from Dreamine.Threading.
It should not directly control native Windows thread behavior.

The WPF monitor observes thread state through:

IDreamineThreadManager
DreamineThreadInfo
DreamineThreadStatus
DreamineThreadPriority

This keeps the UI layer separated from scheduling and platform logic.

Validation Scenario

The WPF monitor was validated with:

High Adaptive Jobs: 5
High Raw Jobs:      5
Normal Jobs:        30
Total Jobs:         40

Observed behavior in the monitor:

Raw workers
 → very high cycle count

Adaptive workers
 → lower cycle count because adaptive delay was applied

Normal workers
 → stable 100ms cycle behavior

Overflow jobs
 → visible through increased Jobs count on selected workers

Affinity
 → displayed through Core and Affinity columns

Last Error
 → remained empty during successful validation
Dreamine.Threading
Dreamine.Threading.Windows
Dreamine.Threading.Wpf

Status

Implemented:

  • WPF Thread Monitor View
  • Thread Monitor ViewModel
  • Observable thread info list
  • periodic refresh
  • status brush converter
  • priority text converter
  • selected thread detail panel
  • WPF UI dispatcher
  • registration helper

Planned improvements:

  • summary header
  • total worker count
  • total job count
  • overflow job count
  • adaptive/raw/normal grouping
  • refresh interval option
  • command buttons for Start / Stop / Pause / Resume
  • more stable incremental collection update

License

MIT License

Product Compatible and additional computed target framework versions.
.NET net8.0-windows7.0 is compatible.  net9.0-windows was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Dreamine.Threading.Wpf:

Package Downloads
Dreamine.MVVM.FullKit

All-in-one package for Dreamine MVVM on WPF. Includes core MVVM modules and automatic source generator integration.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 123 5/9/2026