How to call Clients in thread?

mc 6,576 Reputation points
2022-12-14T09:13:35.377+00:00

I am using signalr in asp.net core

I want to use it in thread.

but there will be disposed exception. but it is not disposed.

public Thread PThread{get;set;}=new Thread(Pan);  
  
public async void Pan()  
  
{  
await Clients.All.SendAsync("some",i);//will be exception.  
}  

or how to do task every 1 seconds? which can use Clients?

Developer technologies | ASP.NET | ASP.NET Core
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.