Home Discussion Discuss: Inter-Thread Communication

  • In above first example an error is thereRahul singh sanger February 14, 2013 at 11:58 AM

    synchronized void put(int num) { value=false; // wrong value=true; // right } Here value should change in true not in false.. This is not my doubt is a correction i don't have any other space that why i put it in this section..

  • Programtorres November 30, 2011 at 4:21 PM

    our sir told the same program in the class.... cheater

  • urgentinspector J March 29, 2012 at 1:11 AM

    listen in the shared class the method get() have a loop that repeating if "value" is false and leave loop if true encounters , but at the same time in starting we set "value" is false.Then how the hell "value" suppose to change,it shud not be changed and should not be leaving loop. Utter confusion here plz help plz... Thanks in adv. plz take interest..

  • Incorrect use of wait(0 methodSeshadri Rangaswami December 17, 2012 at 3:54 AM

    The above program shows wait() method invoked with an "if" statement first and with no condiion next. wait method should always be invoked in a while loop. Otherwise the thread will encounter "liveness" problem.

  • Doesn't workScriptKiddi November 29, 2012 at 8:48 PM

    First example doesnt really work - you have to change "value==false" into "value==true" in the put-function (line 35). Thanks for the fish. :)

Post your Comment



Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Related Articles
Programming Tutorials

Communication Tube
Communication Tube       Communication Tube - web messenger chat client for the popular IM (instant messaging) networks: ICQ , MSN Messenger, Google Talk (GTalk) , IRC Read full 

Programming Tutorials

Communication Portal
Communication Portal       A communication interface desinged with Web 2.0 technology, mission is to help peolpe communicate easily over a comfortable web interface Read full Description 

Mobile Applications Questions

Mobile Communication
 

EJB Questions

remote communication
 

Mobile Applications Questions

mobile2mobile communication
 

Programming Tutorials

Interthread Communication
Inter-Thread Communication   ... communication among threads which reduces the CPU?s idle time i.e. A process where, a thread is paused while running in its critical region and another thread 

Software Services

Communication Effectiveness in Outsourcing, Communication Techiques in Outsourcing
Communication Effectiveness in Outsourcing  Introduction A good part of the communication in outsourcing relationships is achieved... to communicate, the success of communication increases in the order of email, telephone 

Java Interview Questions

digital communication system
digital communication system  A digital communication system capable of interconnecting, a large number of computers, terminals and other peripheral devices within a limited geographical area is called- a) LAN, B) WAN, C 

Cloud Computing

Data over Voice Communication
Data over Voice Communication  I just Want to know that Data Over Voice communication is possible in India or Not, If not then Why. and If Yes then Why Please anyone give the answer 

Java Beginners

Inter Thread Communication
Inter Thread Communication  what is inter thread communication?   hi friend, Inter thread communication is a process of communication between two threads. In this process, a thread outside the critical section is tried 

Applet Questions

applet servlet communication - Applet
applet servlet communication  Can anybody tell me applet - servlet communication by creating a webproject in eclipse. I am creating a web...()); g.drawString("Applet Servlet Communication",50,50); String str = new String(); str 

General

Interthread Communication in Java
Interthread Communication in Java As you know about producer-consumer problem of thread. In this problem one thread is producing data and another... wasting of cycle or polling, interthread communication is a good way.  Given 

Struts Questions

Inter Server Communication - Struts
Inter Server Communication   Hi In my project I am using Struts2.0 ,I have 2 server one is web-logic server and another is Tomcat server. In web-logic server , there is link to call tomcat server for call struts application 

Servlet Interview Questions

servlet to applet communication
(servletConnection.getInputStream()); g.drawString("Applet Servlet Communication",50,50); String str 

Java Beginners

Failed Client-Socket Communication
extends Thread{ DataInputStream in; DataOutputStream out; private 

Applet Questions

Applet JSP communication - Applet
 

EJB Questions

EJB communication - EJB
 

Java Beginners

Wireless communication - Java Beginners
 

Java Beginners

tcp client server communication
 

General

Interthread communication
Interthread communication   ... communication among threads which reduces the CPU?s idle time i.e. A process where, a thread is paused while running in its critical region and another thread 

IDE Questions

Java Serial Communication - IDE Questions
Java Serial Communication  Does Netbeans support serial port communication for windows??? because netbeans doesnt support javax.comm package . I... help.thanks in advance. Its giving Exception in thread "AWT-EventQueue-0 

Hibernate Questions

What is the general flow of Hibernate communication with RDBMS?
What is the general flow of Hibernate communication with RDBMS?  Hi, What is the general flow of Hibernate communication with RDBMS? thanks 

Java Beginners

serial port communication using bluetooth in j2me
serial port communication using bluetooth in j2me   how to make serial port communication using bluetooth in j2me ? what r prerequisites 

Java Beginners

serial port communication using bluetooth in j2me
serial port communication using bluetooth in j2me   how to make serial port communication using bluetooth in j2me ? what r prerequisites 

Management

Need of Communication Management
Communication management is the systematic process by which any organization planned, implement, monitor or revision the all channels of communication for better output. It is the wide use of communication technology within 

Software Services

Communication Website Development
Communication Website Development We provide high quality Communication... team will help you in developing websites for Communication industry. We... for communication industry. A website is the virtual representation of a company 

Management

Communication: Marketing tools
Communication has become an inseparable part of modern life and the same is true for the survival of any business organization where communication... be a guarantee for its success if there is a gap of communication among its other 

JSP Servlet Questions

jsp applet communication - JSP-Servlet
 

JSP Servlet Questions

Parent - child jsp communication - JSP-Servlet
 

JSP Servlet Questions

Parent - child jsp communication - JSP-Servlet
 

DMCA.com