Periodically call method within my worker threads

Periodically call method within my worker threads

I am creating multiple different threads from a single manager class. I now need to periodically update each thread by calling a function within it. What is the best approach? The thread has a reference to the manager class so I was thinking to pass back a function to the manager from within the thread, but that doesn't seem right, surely there is a better way. I looked at Dispatcher class but this didn't seem right either. Can anyone recommend the best approach to this?

I am creating multiple different threads from a single manager class. I now need to periodically update each thread by calling a function within it. What is the best approach? The thread has a reference to the manager class so I was thinking to pass back a function to the manager from within the thread, but that doesn't seem right, surely there is a better way. I looked at Dispatcher class but this didn't seem right either. Can anyone recommend the best approach to this?

account = new Account(this);
Thread accountThread1 = new Thread(new ThreadStart(account.Run));
Thread accountThread2 = new Thread(new ThreadStart(account.Run));

accountThread1.Start(); accountThread2.Start();

// How do I call method on accountThread1 or 2?


Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

Add asp.net Identity in empty project

LIKE | COMMENT | SHARE | SUBSCRIBE Today, in this tutorial you will see the process of adding an ASP.NET Identity to the ASP.NET Web Application developed in...

List all users from asp net core identity

LIKE | COMMENT | SHARE | SUBSCRIBE In this video, i will show you How to retrieve and display all the registered application users in asp.net core using the ...

Extend IdentityUser in ASP NET Core

LIKE | COMMENT | SHARE | SUBSCRIBE In this tutorials, I will show you how to extend IdentityUser in asp.net core.. Subscribe & Stay Connected! Thank You! ♥ #...