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 6813565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:35:06+00:00 2026-05-26T20:35:06+00:00

The class Thread is a sealed class meaning it cannot be inherited from and

  • 0

The class Thread is a sealed class meaning it cannot be inherited from and I need an instance of a reusable Thread that should inherit from the Thread class. Does anyone have an idea how i can reuse tread ?

  • 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-26T20:35:07+00:00Added an answer on May 26, 2026 at 8:35 pm

    As you yourself noted, Thread is a sealed class. Obviously this means you cannot inherit from it. However, you can create your own BaseThread class that you can inherit and override to provide custom functionality using Composition.

    abstract class BaseThread
    {
        private Thread _thread;
    
        protected BaseThread()
        {
            _thread = new Thread(new ThreadStart(this.RunThread));
        }
    
        // Thread methods / properties
        public void Start() => _thread.Start();
        public void Join() => _thread.Join();
        public bool IsAlive => _thread.IsAlive;
    
        // Override in base class
        public abstract void RunThread();
    }
    
    public MyThread : BaseThread
    {
        public MyThread()
            : base()
        {
        }
    
        public override void RunThread()
        {
            // Do some stuff
        }
    }
    

    You get the idea.

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

Sidebar

Related Questions

Does this simple cache class need thread synchronization ... if I remove the lock
I'm trying to create a thread class that executes a functor from an adapter.
Does anyone know how to pass multiple parameters into a Thread.Start routine? I thought
I have a class that contains an NSDictionary and periodically, I have a thread
As per the singleton pattern, public sealed class Singleton { static Singleton instance=null; Singleton()
I read that the following class is not thread safe since threads could read
Is the standard Java 1.6 javax.xml.parsers.DocumentBuilder class thread safe? Is it safe to call
In C# there is a method SetApartmentState in the class Thread . How do
I have a template class for thread-safe vector: template <class T> class SharedVector {
I'm creating a thread class to encapsulate the windows thread methods. I'm trying to

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.