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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:38:25+00:00 2026-05-16T22:38:25+00:00

i have bunch of question regarding to boost thread ? How to initialize the

  • 0

i have bunch of question regarding to boost thread ?

  1. How to initialize the boost thread ID with the thread constructor?
  2. Why the thread id becomes invalid after called join() function ?
  3. As usual, a class member function is copy to thread internal storage in order to execute the member function but i found out that someone just encapsulates the boost thread in a class.
    What is the purposes for this ?

On the other hands, do we allow to inherit the boost thread ?
Please help.

Thanks.

  • 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-16T22:38:25+00:00Added an answer on May 16, 2026 at 10:38 pm
    1. You can get the ID from a boost::thread object by calling it’s get_id() member function:
    boost::thread t(do_something);
    boost::thread::id tid=t.get_id();
    

    You can get the ID of the current thread by calling boost::this_thread::get_id().

    1. Thread ID values remain valid after a thread exits, unlike the thread IDs for some OS thread libraries.

    2. If you pass in the address of a member function, and the address of an object then you can run a member function on that object on a new thread. You can therefore start threads in a member function, and pass this as the object pointer. This allows the new thread to share data via the data members of the class instance.

      You can derive from boost::thread but it wouldn’t really get you anywhere as there are no virtual functions.

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

Sidebar

Related Questions

The question states what I want to do. I have a bunch of classes
I have a bunch of forms that I need to put in a list
I have a web application which among other things contains a table of items
I am creating an API with a bunch of public methods to be published
I am curently busy with bulding a synthax document in SPSS and have a
I have a small project which will use iPad as an information kiosk for
I have a WCF service hosted on IIS and it accepts connection like this
i am writing an app to compare products, using Python and GAE. The products
Many times, when generating messages to show to the user, the message will contain
I am working on my first Android Application and I am trying to implement

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.