Package java.util.concurrent.locks

Examples of java.util.concurrent.locks.Condition.signal()


        long start = System.currentTimeMillis();
        Runnable doNothing = new Runnable() {
            public void run() {
                runLock.lock();
                try {
                    runCondition.signal();
                } finally {
                    runLock.unlock();
                }
            }
        };
View Full Code Here


        long start = System.currentTimeMillis();
        Runnable doNothing = new Runnable() {
            public void run() {
                runLock.lock();
                try {
                    runCondition.signal();
                } finally {
                    runLock.unlock();
                }
            }
        };
View Full Code Here

        long start = System.currentTimeMillis();
        Runnable doNothing = new Runnable() {
            public void run() {
                runLock.lock();
                try {
                    runCondition.signal();
                } finally {
                    runLock.unlock();
                }
            }
        };
View Full Code Here

            } else {
                this.availableMemory += size;
            }
            Condition moreMem = this.waiters.peekFirst();
            if (moreMem != null)
                moreMem.signal();
        } finally {
            lock.unlock();
        }
    }
View Full Code Here

                                    } catch (IOException e1) {
                                        e1.printStackTrace();
                                    } finally {
                                        try {
                                            lock.lock();
                                            condition.signal();
                                        } finally {
                                            lock.unlock();
                                        }
                                    }
                                }
View Full Code Here

                if (e.isIncoming() && filter.accept(iq)) {
                    lock.lock();
                    try {
                        result[0] = iq;
                    } finally {
                        resultReceived.signal();
                        lock.unlock();
                    }
                }
            }
        };
View Full Code Here

                if (e.isIncoming() && filter.accept(presence)) {
                    lock.lock();
                    try {
                        result[0] = presence;
                    } finally {
                        resultReceived.signal();
                        lock.unlock();
                    }
                }
            }
        };
View Full Code Here

                if (e.isIncoming() && filter.accept(message)) {
                    lock.lock();
                    try {
                        result[0] = message;
                    } finally {
                        resultReceived.signal();
                        lock.unlock();
                    }
                }
            }
        };
View Full Code Here

                    lock.lock();
                    try {
                        // Auto-accept the incoming stream
                        byteStreamSessions[0] = e.accept();
                        // If no exception occurred during stream method negotiation, notify the waiting thread.
                        byteStreamOpened.signal();
                    } catch (Exception e1) {
                        negotiationExceptions.add(e1);
                    } finally {
                        lock.unlock();
                    }
View Full Code Here

        long start = System.currentTimeMillis();
        Runnable doNothing = new Runnable() {
            public void run() {
                runLock.lock();
                try {
                    runCondition.signal();
                } finally {
                    runLock.unlock();
                }
            }
        };
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.