• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 386
  • Last Modified:

Thread reference in Hashtable

What effect if any is there on a reference to a running thread held in a Hashtable, should the thread no longer be running?
1 Solution
A reference to a Thread is just that: a reference. Whether the Thread runs or not is not connected to where the reference is held; an array, a variable, or a hash table. The reference merely provides data which are a means to controlling, or obtaining information about, the Thread by calling methods of the Thread class.

So it makes no difference, conceptually, whether the Thread is running or not.
Now the details of your program may or may not impose some kind of constraint. But that is the more specific situation.

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now