org.jruby.Ruby.oldRecursionGuard()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(3.4k)|赞(0)|评价(0)|浏览(94)

本文整理了Java中org.jruby.Ruby.oldRecursionGuard方法的一些代码示例,展示了Ruby.oldRecursionGuard的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ruby.oldRecursionGuard方法的具体详情如下:
包路径:org.jruby.Ruby
类名称:Ruby
方法名:oldRecursionGuard

Ruby.oldRecursionGuard介绍

暂无

代码示例

代码示例来源:origin: org.jruby/jruby-core

/**
 * Begin a recursive walk that may make one or more calls to
 * {@link Ruby#execRecursive(org.jruby.Ruby.RecursiveFunction, org.jruby.runtime.builtin.IRubyObject) execRecursive}.
 * Clean up recursive structures once complete.
 *
 * @param body
 * @param <T>
 * @return
 */
@Deprecated
public <T extends IRubyObject> T recursiveListOperation(Callable<T> body) {
  return oldRecursionGuard().recursiveListOperation(body);
}

代码示例来源:origin: org.jruby/jruby-complete

/**
 * Begin a recursive walk that may make one or more calls to
 * {@link Ruby#execRecursive(org.jruby.Ruby.RecursiveFunction, org.jruby.runtime.builtin.IRubyObject) execRecursive}.
 * Clean up recursive structures once complete.
 *
 * @param body
 * @param <T>
 * @return
 */
@Deprecated
public <T extends IRubyObject> T recursiveListOperation(Callable<T> body) {
  return oldRecursionGuard().recursiveListOperation(body);
}

代码示例来源:origin: org.jruby/jruby-complete

/**
 * Perform a recursive walk on the given object using the given function.
 * Treat this as the outermost call, cleaning up recursive structures.
 *
 * MRI: rb_exec_recursive_outer
 *
 * If recursion is detected on the current method and obj, the outermost
 * func will be called with (obj, arg, Qtrue). All inner func will be
 * short-circuited using throw.
 *
 * @deprecated Use ThreadContext.safeRecurse.
 *
 * @param func
 * @param obj
 * @return
 */
@Deprecated
public IRubyObject execRecursiveOuter(RecursiveFunction func, IRubyObject obj) {
  return oldRecursionGuard().execRecursiveOuter(func, obj);
}

代码示例来源:origin: org.jruby/jruby-core

/**
 * Perform a recursive walk on the given object using the given function.
 * Treat this as the outermost call, cleaning up recursive structures.
 *
 * MRI: rb_exec_recursive_outer
 *
 * If recursion is detected on the current method and obj, the outermost
 * func will be called with (obj, arg, Qtrue). All inner func will be
 * short-circuited using throw.
 *
 * @deprecated Use ThreadContext.safeRecurse.
 *
 * @param func
 * @param obj
 * @return
 */
@Deprecated
public IRubyObject execRecursiveOuter(RecursiveFunction func, IRubyObject obj) {
  return oldRecursionGuard().execRecursiveOuter(func, obj);
}

代码示例来源:origin: org.jruby/jruby-complete

/**
 * Perform a recursive walk on the given object using the given function.
 *
 * Do not call this method directly unless you know you're within a call
 * to {@link Ruby#recursiveListOperation(java.util.concurrent.Callable) recursiveListOperation},
 * which will ensure the thread-local recursion tracking data structs are
 * cleared.
 *
 * MRI: rb_exec_recursive
 *
 * Calls func(obj, arg, recursive), where recursive is non-zero if the
 * current method is called recursively on obj
 *
 * @param func
 * @param obj
 * @return
 */
@Deprecated
public IRubyObject execRecursive(RecursiveFunction func, IRubyObject obj) {
  return oldRecursionGuard().execRecursive(func, obj);
}

代码示例来源:origin: org.jruby/jruby-core

/**
 * Perform a recursive walk on the given object using the given function.
 *
 * Do not call this method directly unless you know you're within a call
 * to {@link Ruby#recursiveListOperation(java.util.concurrent.Callable) recursiveListOperation},
 * which will ensure the thread-local recursion tracking data structs are
 * cleared.
 *
 * MRI: rb_exec_recursive
 *
 * Calls func(obj, arg, recursive), where recursive is non-zero if the
 * current method is called recursively on obj
 *
 * @param func
 * @param obj
 * @return
 */
@Deprecated
public IRubyObject execRecursive(RecursiveFunction func, IRubyObject obj) {
  return oldRecursionGuard().execRecursive(func, obj);
}

相关文章

微信公众号

最新文章

更多

Ruby类方法