File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Threads and Synchronization and the fly likes wait and notify methods Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Reply Bookmark "wait and notify methods" Watch "wait and notify methods" New topic
Author

wait and notify methods

rama rajesh
Greenhorn

Joined: Jun 22, 2010
Posts: 28
My req is after inserting each element in vector, it should be displaed.
inserting by one thread and displaying by other thread. both are using the same vector. can someone change the following code according to my requirement.
Jim Hoglund
Ranch Hand

Joined: Jan 09, 2008
Posts: 525
Rama,

Does the code do something that you don't expect?
And if there is a problem, what have you tried so far
to correct it? You are correct that wait() and notify()
will play a role here, in synchronized blocks of course.

Jim ...


BEE MBA PMP SCJP-6
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: wait and notify methods
 
Similar Threads
Beginner: Threads vs. Runnables
yield() on synchronized code
join() synchronizes the threads?
Synchronizing between two threads, one implements Runnable the other extends Thread
wait() and notifyAll()