Package objd.concurrent

Examples of objd.concurrent.AtomicInt


        });
    }
    public FutureEnd() {
        this._promise = Promise.<ImArray<T>>apply();
        this._stopped = false;
        this._counter = new AtomicInt();
        this._ended = false;
        this._yielded = new AtomicBool();
    }
View Full Code Here


        });
    }
    public FutureVoidEnd() {
        this._promise = Promise.<Void>apply();
        this._stopped = false;
        this._counter = new AtomicInt();
        this._ended = false;
        this._yielded = new AtomicBool();
    }
View Full Code Here

            public Promise<Void> apply(final Integer i) {
                return Promise.<Void>apply();
            }
        }).toArray();
        final Future<Void> fut = arr.chain().voidFuture();
        final AtomicInt count = new AtomicInt();
        {
            final Iterator<Promise<Void>> __il__3i = arr.iterator();
            while(__il__3i.hasNext()) {
                final Promise<Void> p = __il__3i.next();
                DispatchQueue.aDefault.asyncF(new P0() {
                    @Override
                    public void apply() {
                        count.incrementAndGet();
                        p.successValue(null);
                    }
                });
            }
        }
        PackageObjectTest.assertTrueValue(fut.waitResultPeriod(((double)(5))) != null);
        PackageObjectTest.<Integer>assertEqualsAB(count.get(), ((int)(arr.count())));
    }
View Full Code Here

TOP

Related Classes of objd.concurrent.AtomicInt

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.