Solved

difference between yield and join method in multithreading

Posted on 2012-04-09
5
361 Views
Last Modified: 2012-04-20
please explain the difference between yield and join method in multithreading
0
Comment
Question by:stmani2005
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:stmani2005
ID: 37874842
Good Answer from girionis now i understand the concepts
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

776 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