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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T00:49:37+00:00 2026-06-07T00:49:37+00:00

I was reading this article by Brian Goetz. Under the section Don’t start threads

  • 0

I was reading this article by Brian Goetz. Under the section Don’t start threads from within constructors he says “A special case of the problem in Listing 4 is starting a thread from within a constructor, because often when an object owns a thread, either that thread is an inner class or we pass the this reference to its constructor (or the class itself extends the Thread class). If an object is going to own a thread, it is best if the object provides a start() method, just like Thread does, and starts the thread from the start() method instead of from the constructor. ” What does he mean by “often when an object owns a thread”?

  • 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-07T00:49:40+00:00Added an answer on June 7, 2026 at 12:49 am

    I don’t think Goetz means to be taken too literally about an object owning a thread. He just means the thread was started within some other object’s constructor, so it can access the state of that object possibly before it has a chance to finish getting constructed. There is no formal, meaningful ownership relationship, it’s all contextual. For instance you might say whoever has a reference to the thread is the owner because they can cancel it, but the reference can get passed around, there’s nothing special about the object that first created the thread.

    If you read Goetz’ book Java Concurrency in Practice it covers design techniques like thread confinement where the scope of things that a thread interacts with are restricted. Also you can create objects so that only one thread can see them, such as when using a ThreadLocal. So you can design your abstractions to create ownership relationships, but it’s up to you.

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

Sidebar

Related Questions

Reading through this excellent article about safe construction techniques by Brain Goetz, I got
After reading this article, it makes sense to rebase to gather changes from the
After reading this article I don't have a clear answer: http://palizine.plynt.com/issues/2010Oct/bypass-xss-filters/ Will browsers interpret
I'm reading this article and on the part with the query: SELECT node.name FROM
I'm reading this article that compares XML to JSON, and in the comments section,
I was reading this article => http://mgutz.com/2010/10/01/check_gmail_with_node_js.html . Below in the comments Shomrom says:
After reading this article http://camendesign.com/code/developpeurs_sans_frontieres I have decided to follow what it says and
I've been reading this article from Valve that seems to explain the architecture of
I'm reading this article and the section on the promise abstraction seems a little
I was reading this article and it says that Object 's clone method is

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.