Examples of newConcurrencyError()


Examples of org.jruby.Ruby.newConcurrencyError()

                    throw runtime.newArgumentError("time interval must be positive");
                }
            }

            if (Thread.interrupted()) {
                throw runtime.newConcurrencyError("thread interrupted");
            }
            boolean success = false;
            try {
                synchronized (this) {
                    mutex.unlock(context);
View Full Code Here

Examples of org.jruby.Ruby.newConcurrencyError()

                synchronized (this) {
                    mutex.unlock(context);
                    try {
                        success = context.getThread().wait_timeout(this, timeout);
                    } catch (InterruptedException ie) {
                        throw runtime.newConcurrencyError(ie.getLocalizedMessage());
                    } finally {
                        // An interrupt or timeout may have caused us to miss
                        // a notify that we consumed, so do another notify in
                        // case someone else is available to pick it up.
                        if (!success) {
View Full Code Here

Examples of org.jruby.Ruby.newConcurrencyError()

            if (timeout < 0) {
                throw runtime.newArgumentError("time interval must be positive");
            }
        }
        if (Thread.interrupted()) {
            throw runtime.newConcurrencyError("thread interrupted");
        }
        boolean success = false;
        try {
            synchronized (this) {
                mutex.unlock(context);
View Full Code Here

Examples of org.jruby.Ruby.newConcurrencyError()

            synchronized (this) {
                mutex.unlock(context);
                try {
                    success = context.getThread().wait_timeout(this, timeout);
                } catch (InterruptedException ie) {
                    throw runtime.newConcurrencyError(ie.getLocalizedMessage());
                } finally {
                    // An interrupt or timeout may have caused us to miss
                    // a notify that we consumed, so do another notify in
                    // case someone else is available to pick it up.
                    if (!success) {
View Full Code Here

Examples of org.jruby.Ruby.newConcurrencyError()

        // submit job and wait to be resumed
        context.runtime.getExecutor().execute(runnable);
        try {
            exchanger.exchange(context.nil);
        } catch (InterruptedException ie) {
            throw runtime.newConcurrencyError("interrupted while waiting for fiber to start");
        }
    }

    protected IRubyObject resumeOrTransfer(ThreadContext context, IRubyObject arg, boolean transfer) {
        try {
View Full Code Here

Examples of org.jruby.Ruby.newConcurrencyError()

            if (timeout < 0) {
                throw runtime.newArgumentError("time interval must be positive");
            }
        }
        if (Thread.interrupted()) {
            throw runtime.newConcurrencyError("thread interrupted");
        }
        boolean success = false;
        try {
            synchronized (this) {
                mutex.unlock(context);
View Full Code Here

Examples of org.jruby.Ruby.newConcurrencyError()

            synchronized (this) {
                mutex.unlock(context);
                try {
                    success = context.getThread().wait_timeout(this, timeout);
                } catch (InterruptedException ie) {
                    throw runtime.newConcurrencyError(ie.getLocalizedMessage());
                } finally {
                    // An interrupt or timeout may have caused us to miss
                    // a notify that we consumed, so do another notify in
                    // case someone else is available to pick it up.
                    if (!success) {
View Full Code Here

Examples of org.jruby.Ruby.newConcurrencyError()

                        // re-get transaction in case this gets run in different threads
                        return block.call(ruby.getCurrentContext());
                    }
                });
            } catch (Exception e) {
                throw ruby.newConcurrencyError(e.getLocalizedMessage());
            }
        }
    }
}
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.