Solved

difference between yield and join method in multithreading

Posted on 2012-04-09
5
391 Views
Last Modified: 2012-04-20
please explain the difference between yield and join method in multithreading
0
Comment
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 9

Author Comment

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

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
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…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses

622 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