threads

if thru out my program, i start a thread, but later jus suspend it, will it use up resources? i mean, waste them.

for those who see this qn, if u want, b prepared to ans quite a few more questions regarding these simple applet stuffs.
java_kevinAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

imladrisCommented:
A suspended thread is still using some resource. A certain amount of memory, and space on the process list for instance. It is not a large amount. On the other hand, if you never need the thread again, it would be better to stop() it.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
java_kevinAuthor Commented:
if i stop it, but later may need again, do i need to .start() again? or i need to create a new thread?
0
java_kevinAuthor Commented:
Adjusted points to 50
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

heyhey_Commented:
my answer is that you can use both techiques with the same result - a real Thread from the underlying OS will be started.
0
imladrisCommented:
Correct. If you stop() it, the way to fire it back up is to use start(). There is no major difference between using stop() - start() and suspend() - resume(). The choice I would make would depend on details of the frequency of the action, and the probable state of the thread at the time of suspension/stopping.
0
java_kevinAuthor Commented:
Thanks.

And 'cos I'm doing a project, I may need to get your details to acknowledge your help.

Hope you can give them in case I need.

Thanks again.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.