Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6029537
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:54:04+00:00 2026-05-23T04:54:04+00:00

I want to do multiple operations in a single worker role. How to create

  • 0

I want to do multiple operations in a single worker role. How to create threads in worker role?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T04:54:05+00:00Added an answer on May 23, 2026 at 4:54 am

    You could add multiple workers in the WorkerRole::OnStart() as described here http://www.31a2ba2a-b718-11dc-8314-0800200c9a66.com/2010/12/running-multiple-threads-on-windows.html

        public class WorkerRole : ThreadedRoleEntryPoint
        {
            public override void Run()
            {
                // This is a sample worker implementation. Replace with your logic.
                Trace.WriteLine("Worker Role entry point called", "Information");
    
                base.Run();
            }
    
            public override bool OnStart()
            {
                List<WorkerEntryPoint> workers = new List<WorkerEntryPoint>();
    
                workers.Add(new ImageSizer());
                workers.Add(new ImageSizer());
                workers.Add(new ImageSizer());
                workers.Add(new HouseCleaner());
                workers.Add(new TurkHandler());
                workers.Add(new Crawler());
                workers.Add(new Crawler());
                workers.Add(new Crawler());
                workers.Add(new Gardener());
                workers.Add(new Striker());
    
                return base.OnStart(workers.ToArray());
            }
        }
    
    
    
       internal class Striker : WorkerEntryPoint
        {
            public override void Run()
            {
                while (true)
                {
                    // Do Some Work
    
                    Thread.Sleep(100);
                }
            }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have multiple processes monitoring an MSMQ queue. I want to do multi-step operations
I want to merge multiple rss feeds into a single feed, removing any duplicates.
I need to read a single file using multiple threads under Linux. There are
I want to create the app modular and would like to create multiple EDMX,
I want to do several operations on a user's data in a single transaction,
In a system with multiple concurrent tasks operating on data, I want to order
I don't want multiple windows, each with its own UI thread, nor events raised
I want edit multiple strings at once by selection the list of strings needs
I have an array that I want on multiple pages, so I made it
I want to insert multiple invisible watermarks into my JPEG pictures through C# code.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.