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

  • SEARCH
  • Home
  • 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 7973347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T08:04:40+00:00 2026-06-04T08:04:40+00:00

we are trying to write a service for windows and need to come up

  • 0

we are trying to write a service for windows and need to come up with a plan for redundancy, so that if something in the application fails, it is brought back up again. i’m wondering if i can use multi-threading to accomplish this.

my idea is to create two threads which each handle separate tasks. i would like to also have each thread monitor the other thread to make sure its still running, if its not, then it should start up a new instance of that thread.
does this sound feasible? what threading techniques would i use: mutexes, shared memory, semaphores, etc…?
if this is not the correct approach, then what might be, just write two separate services and use IPC?

  • 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-06-04T08:04:41+00:00Added an answer on June 4, 2026 at 8:04 am

    Well the easiest way to get your service to restart on failure is to let Windows do it. You just configure the service to auto restart, its really easy. You can also do this programatically durring the service installer. For a guide on how to do this, see this post: Building a Windows Service – Part 4: Extending the Service Installer.

    As for this providing “redundancy”, this does not. The proper definition of redundancy would mean that you have more than one of them. This could be using multiple services, or using multiple services on multiple hosts more likely. Having multiple services on a single host is easier since you can use a mutex to synchronize if needed.

    The real question is what is this service doing?

    If your service is polling for tasks, say from a database or message queue, then the synchronization is taken care of for you. Just model your database such that multiple services can all run and process work independently without duplicating work. Now you have redundancy.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to write a c/c++ application that start/stop any windows service of
I'm trying to write a windows service. It installs fine, but fails when I
I'm trying to write a small Windows Service in .NET 3.5, that check every
I'm trying to write a C++ windows service that can render to a texture.
I'm currently trying to write a Windows Media Center Application (Vista) that can restart
I'm trying to write a Windows service that runs indefinitely. Windows forms and background
I am trying to write a windows service application which deals with storing values
I'm trying to write a simple/small Windows Communication Foundation service application in Visual Basic
i'm trying to write a windows service firing custom events sending Specific strings. These
In short: Trying to write a wcf service for a winform-app that invokes a

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.