?
Solved

threads

Posted on 2000-02-09
6
Medium Priority
?
141 Views
Last Modified: 2010-04-01
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.
0
Comment
Question by:java_kevin
  • 3
  • 2
6 Comments
 
LVL 16

Accepted Solution

by:
imladris earned 200 total points
ID: 2504838
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
 

Author Comment

by:java_kevin
ID: 2506647
if i stop it, but later may need again, do i need to .start() again? or i need to create a new thread?
0
 

Author Comment

by:java_kevin
ID: 2506652
Adjusted points to 50
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
LVL 16

Expert Comment

by:heyhey_
ID: 2506819
my answer is that you can use both techiques with the same result - a real Thread from the underlying OS will be started.
0
 
LVL 16

Expert Comment

by:imladris
ID: 2508139
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
 

Author Comment

by:java_kevin
ID: 2510058
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

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This video teaches viewers about errors in exception handling.
Suggested Courses
Course of the Month4 days, 5 hours left to enroll

599 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question