验证框架里面的——
# mongoid-2.4.12/lib/mongoid/validations.rb
# Begin the associated validation.
#
# @example Begin validation.
# document.begin_validate
#
# @since 2.1.9
def begin_validate
Threaded.begin_validate(self)
end
# Exit the associated validation.
#
# @example Exit validation.
# document.exit_validate
#
# @since 2.1.9
def exit_validate
Threaded.exit_validate(self)
end
如果应用不是多线程/多进程方式进行并发(比如事件驱动),这段代码是否会有问题?