dotnet / dotnet/reactive

Improve thread troubleshooting experience

Open
#266 2 comments 0 reactions 0 assignees View on GitHub
[area] Rx enhancement needs design
Dominant language
C#
Stars
7.2k
Forks
798
PR merge metrics
No merged PRs in 30d

Description

Rx can create threads in various conditions (NewThreadScheduler, EvenLoopScheduler, ThreadPoolScheduler.ScheduleLongRunning, ConcurrencyAbstractionLayer ...), resulting in any leak being impossible to track down to the cause.

Today with the `PlatformEnlightmentProvider` one can inject thread factories in some of these places, allowing the user to inject troubleshooting information when threads are created such as:
- debug log before creating thread
- propagate thread local data
- forcing background threads
- formatting extra info into the thread name, such as:
- parent thread name
- current UI view/form/window/scene

(in case the user is repacking Rx, he can include the assembly name as well, very useful to us ! - but I digress)

If you ever troubleshoot an application with a thread leak and 200+ Rx threads all called "Thread-#XX", maybe you know where this request comes from :)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.