模块:Mongoid::Threaded::Lifecycle::ClassMethods

定义于:
lib/mongoid/threaded/lifecycle.rb

实例方法摘要折叠

实例方法详细信息

# _creating对象

在创建模式下执行区块。

例子:

在创建模式下执行。

creating do
  relation.push(doc)
end

返回:

  • ( Object )

    区块的返回值。



141
142
143
144
145
146
# File 'lib/mongoid/threaded/lifecycle.rb', line 141

def _creating
  线程化.begin_execution(创建)
  产量
确保
  线程化.exit_execution(创建)
end