Examples of executeBlockingTask()


Examples of org.jruby.RubyThread.executeBlockingTask()

        RubyThread thread = runtime.getCurrentContext().getThread();
        NativeFunctionTask task = new NativeFunctionTask(Native.getInstance(runtime), blocking_func,
                blocking_data, unblocking_func, unblocking_data);
        int lockCount = GIL.releaseAllLocks();
        try {
            thread.executeBlockingTask(task);
        } catch (InterruptedException e) {}
        GIL.acquire(lockCount);
        return task.retval;
    }
}
View Full Code Here

Examples of org.jruby.RubyThread.executeBlockingTask()

        try {
            io.addBlockingThread(thread);

            final int[] result = new int[1];

            thread.executeBlockingTask(new RubyThread.BlockingTask() {
                public void run() throws InterruptedException {
                    try {
                        if (!blocking) {
                            result[0] = selector.selectNow();
                            if (result[0] == 0) {
View Full Code Here

Examples of org.jruby.RubyThread.executeBlockingTask()

                blocking_data, unblocking_func, unblocking_data);

        GC.disable();
        int lockCount = GIL.releaseAllLocks();
        try {
            thread.executeBlockingTask(task);
        } catch (InterruptedException e) {
            // ignore
        } finally  {
            GIL.acquire(lockCount);
            GC.enable();
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.