Free Online Courses for Software Developers - MrBool
× Please, log in to give us a feedback. Click here to login
×

You must be logged to download. Click here to login

×

MrBool is totally free and you can help us to help the Developers Community around the world

Yes, I'd like to help the MrBool and the Developers Community before download

No, I'd like to download without make the donation

×

MrBool is totally free and you can help us to help the Developers Community around the world

Yes, I'd like to help the MrBool and the Developers Community before download

No, I'd like to download without make the donation

Threads - Analyzing exam questions - Sun Certified Java Programmer 310-065 - Part 41 | Java courses

In this video, a running thread may enter a blocked/waiting state by calling wait(), sleep(), or join().

Duration: 16:00 minutes

Summary: In this video, we continue our discussion of threads. A running thread may enter a blocked/waiting state by calling wait(), sleep(), or join(). The reason it enters that state is that it cannot acquire the lock for a synchronized block of code. The wait method can take the number of milliseconds to wait (for example, 2000 milliseconds, or 2 seconds). The notifyAll() method must be called from a synchronized context. When a thread is waiting as a result of wait(), it releases its lock. In order to ensure the instances of a class can be safely used by multiple threads, we need to synchronize the public methods. If a piece of code does not acquire a lock on t before calling t.wait(), it throws IllegalMonitorStateException.



Senior Software Engineer with experience in C#, JavaScript, jQuery, Knockout JS, Kendo UI, HTML5, and SQL Server. Ayad has more than 20 years experience in technical training and teaching. Contributor to MrBool for about 7 years.

What did you think of this post?
Services
[Close]
To have full access to this post (or download the associated files) you must have MrBool Credits.

  See the prices for this post in Mr.Bool Credits System below:

Individually – in this case the price for this post is US$ 2,00 (Buy it now)
in this case you will buy only this video by paying the full price with no discount.

Package of 10 credits - in this case the price for this post is US$ 1,00
This subscription is ideal if you want to download few videos. In this plan you will receive a discount of 50% in each video. Subscribe for this package!

Package of 50 credits – in this case the price for this post is US$ 0,33
This subscription is ideal if you want to download several videos. In this plan you will receive a discount of 83% in each video. Subscribe for this package!


> More info about MrBool Credits
[Close]
You must be logged to download.

Click here to login