Java in a Nutshell, 5th Edition [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Java in a Nutshell, 5th Edition [Electronic resources] - نسخه متنی

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید


CountDownLatchjava.util.concurrent

Java 5.0

This class

synchronizes
threads. All threads that call await( ) block
until the countDown( ) method is invoked a
specified number of times. The required number of calls is specified
when the CountDownLatch is created. Once
countDown( ) has been called the required number
of times, all threads blocked in await( ) are
allowed to resume, and any subsequent calls to await(
) do not block. getCount( ) returns the
number of calls to countDown( ) that must still be
made before the threads blocked in await( ) can
resume. Note that there is no way to reset the count. Once a
CountDownLatch has
"latched," it remains in that state
forever. Create a new CountDownLatch if you need
to synchronize another group of threads. Contrast this class with
CyclicBarrier.

public class

CountDownLatch {
// Public Constructors
public

CountDownLatch (int

count );
// Public Instance Methods
public void

await ( ) throws InterruptedException;
public boolean

await (long

timeout , TimeUnit

unit ) throws InterruptedException;
public void

countDown ( );
public long

getCount ( );
// Public Methods Overriding Object
public String

toString ( );
}



    / 1191