本文整理了Java中org.jruby.Ruby.getThreadError
方法的一些代码示例,展示了Ruby.getThreadError
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ruby.getThreadError
方法的具体详情如下:
包路径:org.jruby.Ruby
类名称:Ruby
方法名:getThreadError
暂无
代码示例来源:origin: org.jruby/jruby-complete
public synchronized void checkShutdown() {
if (queue == null) {
throw RaiseException.from(runtime, runtime.getThreadError(), "queue shut down");
}
}
代码示例来源:origin: org.jruby/jruby-core
public synchronized void checkShutdown() {
if (queue == null) {
throw RaiseException.from(runtime, runtime.getThreadError(), "queue shut down");
}
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
public synchronized void checkShutdown(ThreadContext context) {
if (entries == null) {
throw new RaiseException(context.runtime, context.runtime.getThreadError(), "queue shut down", false);
}
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
public synchronized void checkShutdown(ThreadContext context) {
if (entries == null) {
throw new RaiseException(context.runtime, context.runtime.getThreadError(), "queue shut down", false);
}
}
代码示例来源:origin: org.jruby/jruby-complete
public RaiseException newThreadError(String message) {
return newRaiseException(getThreadError(), message);
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
public RaiseException newThreadError(String message) {
return newRaiseException(getThreadError(), message);
}
代码示例来源:origin: org.jruby/jruby-core
public RaiseException newThreadError(String message) {
return newRaiseException(getThreadError(), message);
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
public RaiseException newThreadError(String message) {
return newRaiseException(getThreadError(), message);
}
代码示例来源:origin: org.jruby/jruby-complete
public synchronized void checkShutdown() {
if (isShutdown()) {
Ruby runtime = getRuntime();
throw RaiseException.from(runtime, runtime.getThreadError(), "queue shut down");
}
}
代码示例来源:origin: org.jruby/jruby-complete
@JRubyMethod(name = {"call", "[]"}, rest = true)
public IRubyObject call(ThreadContext context, IRubyObject[] args) {
if (disabled) {
RubyKernel.raise(context, context.runtime.getThreadError(),
new IRubyObject[]{context.runtime.newString("continuations can not be called from outside their scope")},
Block.NULL_BLOCK);
}
continuation.args = args;
throw continuation;
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
@JRubyMethod(name = {"call", "[]"}, rest = true)
public IRubyObject call(ThreadContext context, IRubyObject[] args) {
if (disabled) {
RubyKernel.raise(context, context.runtime.getThreadError(),
new IRubyObject[]{context.runtime.newString("continuations can not be called from outside their scope")},
Block.NULL_BLOCK);
}
continuation.args = args;
throw continuation;
}
代码示例来源:origin: org.jruby/jruby-core
@JRubyMethod(name = {"call", "[]"}, rest = true)
public IRubyObject call(ThreadContext context, IRubyObject[] args) {
if (disabled) {
RubyKernel.raise(context, context.runtime.getThreadError(),
new IRubyObject[]{context.runtime.newString("continuations can not be called from outside their scope")},
Block.NULL_BLOCK);
}
continuation.args = args;
throw continuation;
}
代码示例来源:origin: org.jruby/jruby-core
public synchronized void checkShutdown() {
if (isShutdown()) {
Ruby runtime = getRuntime();
throw RaiseException.from(runtime, runtime.getThreadError(), "queue shut down");
}
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
private static IRubyObject raiseBecauseCritical(ThreadContext context) {
Ruby runtime = context.runtime;
return RubyKernel.raise(context, runtime.getKernel(), new IRubyObject[]{runtime.getThreadError(), runtime.newString("timeout within critical section")}, Block.NULL_BLOCK);
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
@JRubyMethod(name = {"call", "[]"}, rest = true)
public IRubyObject call(ThreadContext context, IRubyObject[] args) {
if (disabled) {
RubyKernel.raise(context, context.runtime.getThreadError(),
new IRubyObject[]{context.runtime.newString("continuations can not be called from outside their scope")},
Block.NULL_BLOCK);
}
continuation.args = args;
throw continuation;
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
private static IRubyObject raiseBecauseCritical(ThreadContext context) {
Ruby runtime = context.runtime;
return RubyKernel.raise(context, runtime.getKernel(), new IRubyObject[]{runtime.getThreadError(), runtime.newString("timeout within critical section")}, Block.NULL_BLOCK);
}
代码示例来源:origin: org.jruby/jruby-complete
private IRubyObject pop(ThreadContext context, boolean should_block) {
final BlockingQueue<IRubyObject> queue = getQueueSafe();
if (!should_block && queue.size() == 0) {
throw RaiseException.from(context.runtime, context.runtime.getThreadError(), "queue empty");
}
try {
return context.getThread().executeTask(context, this, takeTask);
} catch (InterruptedException ie) {
throw context.runtime.newThreadError("interrupted in FiberQueue.pop");
}
}
代码示例来源:origin: org.jruby/jruby-core
private IRubyObject pop(ThreadContext context, boolean should_block) {
final BlockingQueue<IRubyObject> queue = getQueueSafe();
if (!should_block && queue.size() == 0) {
throw RaiseException.from(context.runtime, context.runtime.getThreadError(), "queue empty");
}
try {
return context.getThread().executeTask(context, this, takeTask);
} catch (InterruptedException ie) {
throw context.runtime.newThreadError("interrupted in FiberQueue.pop");
}
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
private synchronized IRubyObject pop(ThreadContext context, boolean should_block) {
checkShutdown(context);
if (!should_block && entries.size() == 0) {
throw new RaiseException(context.runtime, context.runtime.getThreadError(), "queue empty", false);
}
numWaiting++;
try {
while (java_length() == 0) {
try {
context.getThread().wait_timeout(this, null);
} catch (InterruptedException e) {
}
checkShutdown(context);
}
} finally {
numWaiting--;
}
return (IRubyObject) entries.removeFirst();
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
private synchronized IRubyObject pop(ThreadContext context, boolean should_block) {
checkShutdown(context);
if (!should_block && entries.size() == 0) {
throw new RaiseException(context.runtime, context.runtime.getThreadError(), "queue empty", false);
}
numWaiting++;
try {
while (java_length() == 0) {
try {
context.getThread().wait_timeout(this, null);
} catch (InterruptedException e) {
}
checkShutdown(context);
}
} finally {
numWaiting--;
}
return (IRubyObject) entries.removeFirst();
}
内容来源于网络,如有侵权,请联系作者删除!