Open
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 :)