Q:

Polling thread in Blazor

I am building a Blazor application with a REST API and Web interface.  I will also have a monitoring part of the application that will poll data each second from a lot of different data sources.  I have created a long running thread in a separate class that simply polls the data I want and it seems to be working fine.  The application template I am using is a Blazor ASP.NET Server application.  Simply like this:
 m_pollThread = new Thread(new ThreadStart(PollThread))
 {
    IsBackground = true
 };
 m_pollThread. Start();

What I am wondering now is: is it completely wrong with respect to programming patterns to put this type of polling threads inside of the Blazor application itself?  Is there some problems doing like this that will backfire later on (memory consumption, performance of the rest of the application)?  The reason why I am asking is because as far as I know, Blazor and ASP.NET Core applications are general "on-request" and wakes up when something is requested, and not executing long-running endless polling tasks.  I do not know if I could run that within IIS for instance. 

A:

is it completely wrong with respect to programming patterns to put this type of polling threads inside of the Blazor application itself?  

Yes.  It won't break immediately but it is asking for trouble.  
The solution is easy though, ASP.NET core  lets you run multiple Host threads very easily.  
The new worker template is probably the preferred way now but all you really need is 
class MyPollingService : BackgroundService { ... }

and
services. AddHostedService<MyPollingService>();

Your gain is better integration with the framework and more control over Start and Stop etc. 