02-27-2013, 12:55 AM | #1 |
Registered User
Join Date: Feb 2013
Posts: 2
|
Thread
Dear Members,
Can anyone please tell me, What is thread in Java and it's usage ?
__________________
Find To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. for business, tourism, extended work or medical treatment |
10-09-2013, 11:24 PM | #2 |
Registered User
Join Date: Sep 2013
Posts: 86
|
thread is a flow of control within a program. A thread is similar to the more familiar notion of a process, except that multiple threads within the same application share much of the same state--in particular, they run in the same address space. It's not unlike a golf course, which can be used by many players at the same time. Sharing the same address space means that threads share instance variables, but not local variables
A new thread is born when we create an instance of the java.lang.Thread class. The Thread object represents a real thread in the Java interpreter and serves as a handle for controlling and synchronizing its execution. With it, we can start the thread, stop the thread, or suspend it temporarily.
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. |
02-26-2014, 12:57 AM | #3 | |
Registered User
Join Date: Nov 2013
Posts: 92
|
Quote:
The operating system can run a lot of programs (processes) and a program can run a lot of threads. Typically threads are used to do background work in a program. At any given time, there may be many such background threads, performing activities in parallel in an application, like requesting images, updating the screen, playing audio, and so on. But often the threads provide the only way to effectively handle a number of tasks. That is why it is important to understand and to know how to use threads in concurrent programming in Java.
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Before Posting - Read First | iwinweekly | Making money on the web | 179 | 03-23-2023 03:11 AM |
Hello - consult on thread | Ale Silva | Introduction Area | 12 | 05-14-2015 04:47 AM |
PTFE Thread Seal Tape | ptfetapes | General Discussion | 3 | 01-02-2014 04:36 AM |
Hey everyone. As I mentioned in another thread, I have a couple adsense sites up, but | aopo.mark | General Discussion | 4 | 12-26-2013 04:00 AM |
Win £100 CASH @ Webmaster Serve | Hafsoh | Post your ad here | 1 | 10-26-2011 02:26 AM |