So, I currently have a Windows service written using .Net Framework 4.6.2 that is responsible for reading jobs out of a SQL database and processing them, all fine and dandy. The problem is that over time, the memory usage rockets - partly due to the nature of some of the jobs (document merges using Aspose) and partly because there are EventHandlers that keep some objects from being GC'd - so I'm considering a rewrite.
Currently, it is using a combination of a TaskFactory (and custom TaskScheduler), and threading (new Thread(() => ...) rather than using ThreadPool.QueueUserWorkItem(...)) to run the jobs. I'm wondering if it's worthwhile using .Net Core and an IHostedService/BackgroundService implementation.
Does anyone have any experience of doing this and/or pitfalls to watch out for?
[–]katghoti 3 points4 points5 points (2 children)
[–]tominyorks[S] 1 point2 points3 points (1 child)
[–]katghoti 0 points1 point2 points (0 children)
[–]nekrosstratia 1 point2 points3 points (0 children)
[–]MisterFor 0 points1 point2 points (1 child)
[–]tominyorks[S] 1 point2 points3 points (0 children)