|
-
Sep 23rd, 2005, 01:09 PM
#1
Thread Starter
Dazed Member
Sizing an Array parameter.
Im using enumerate(Thread[] t) to get a count of all the active Threads that I have running within my program. Problem is that even though I know how many threads that I spawn within my prog I am sure that there are times when the amount of active Threads is not know. So how does one know how large to make the Array? ThreadGroup has activeCount() which returns all active threads but this requires an instance of a ThreadGroup.
-
Sep 24th, 2005, 09:46 AM
#2
Frenzied Member
Re: Sizing an Array parameter.
Is there some possible way to integrate into an "anonymous" array?
Such as this:
String[] days = new String[] {"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"};
-
Sep 24th, 2005, 01:56 PM
#3
Re: Sizing an Array parameter.
Call Thread.currentThread().getThreadGroup()
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Sep 24th, 2005, 04:54 PM
#4
Thread Starter
Dazed Member
Re: Sizing an Array parameter.
That's CornedBee that's exactaly what I was looking for. Thanks also System_Error. Help is always greatly appreciated.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|