Solved

difference between yield and join method in multithreading

Posted on 2012-04-09
5
362 Views
Last Modified: 2012-04-20
please explain the difference between yield and join method in multithreading
0
Comment
5 Comments
 
LVL 11

Expert Comment

by:anilallewar
ID: 37827875
@Vee_Mod, this post was in answer to providing explaination on the behaviour which is not available in forum.

It is not a solution but an explaination. For the other questions where solution was required, I have provided links to reference material.
0
 
LVL 35

Accepted Solution

by:
girionis earned 500 total points
ID: 37836696
Yield: the current thread stops executing and gives a chance to other (waiting) threads to execute. If the other waiting threads have a lower priority then the current thread keeps on executing.
Join: the current thread calls join on another thread (lets say t1). t1 starts executing and the current thread goes into a waiting state. When t1 finishes the current thread resumes execution.

For more info:

http://www.java-forums.org/new-java/12990-difference-between-thread-yield-thread-sleep-methods.html
http://docs.oracle.com/javase/6/docs/api/index.html?java/util/Calendar.html
0
 
LVL 8

Author Comment

by:Manikandan Thiagarajan
ID: 37874842
Good Answer from girionis now i understand the concepts
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
servlet  URL Rewriting 1 42
factorial example 4 47
difference between sorce folder and folder in eclipise 3 28
Selenium docs api java index 3 48
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This video teaches viewers about errors in exception handling.

856 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