Package ptolemy.kernel.util

Examples of ptolemy.kernel.util.Workspace.wait()


                _readPending = thread;
                _director.threadBlocked(thread, this, DDEDirector.READ_BLOCKED);

                while ((_readPending != null) && !_terminate) {
                    try {
                        workspace.wait(_director);
                    } catch (InterruptedException e) {
                        _terminate = true;
                        break;
                    }
                }
View Full Code Here


                _director.threadBlocked(_writePending, this,
                        DDEDirector.WRITE_BLOCKED);

                while ((_writePending != null) && !_terminate) {
                    try {
                        workspace.wait(_director);
                    } catch (InterruptedException e) {
                        _terminate = true;
                        break;
                    }
                }
View Full Code Here

                // Wait to try again.
                try {
                    _readPending = Thread.currentThread();
                    _director.threadBlocked(Thread.currentThread(), this);
                    workspace.wait(_director);
                } catch (InterruptedException e) {
                    _terminate = true;
                }
            }
View Full Code Here

                try {
                    _writePending = Thread.currentThread();
                    _director.threadBlocked(_writePending, this);

                    Workspace workspace = getContainer().workspace();
                    workspace.wait(_director);
                } catch (InterruptedException e) {
                    _terminate = true;
                }
            }
View Full Code Here

                            _debug("-- Thread waiting for "
                                    + "canceled pause request.");

                            try {
                                workspace.wait(_director);
                            } catch (InterruptedException ex) {
                                _debug("-- Thread interrupted, "
                                        + "so cancel iteration.");
                                break;
                            }
View Full Code Here

                    _readPending = Thread.currentThread();
                    _director.threadBlocked(Thread.currentThread(), this,
                            PNDirector.READ_BLOCKED);

                    Workspace workspace = getContainer().workspace();
                    workspace.wait(_director);
                } catch (InterruptedException e) {
                    _terminate = true;
                }
            }
View Full Code Here

                    _writePending = Thread.currentThread();
                    _director.threadBlocked(_writePending, this,
                            PNDirector.WRITE_BLOCKED);

                    Workspace workspace = getContainer().workspace();
                    workspace.wait(_director);
                } catch (InterruptedException e) {
                    _terminate = true;
                }
            }
View Full Code Here

                    if (outsideDirector != null) {
                        ((ProcessDirector) outsideDirector).threadBlocked(
                                Thread.currentThread(), null);
                    }

                    workspace.wait(this);
                } catch (InterruptedException e) {
                    // stop all threads
                    stop();
                    return;
                } finally {
View Full Code Here

        _inputBranchController.deactivateBranches();

        while (!_inputBranchController.isBlocked()) {
            try {
                workspace.wait(this);
            } catch (InterruptedException e) {
                // Exit the loop.
                // FIXME: Is this the right thing to do?
                break;
            }
View Full Code Here

        _outputBranchController.deactivateBranches();

        while (!_outputBranchController.isBlocked()) {
            try {
                workspace.wait(this);
            } catch (InterruptedException e) {
                // Exit the loop.
                // FIXME: Is this the right thing to do?
                break;
            }
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.