Sha256: 37a55be948885178d56fed82490a225da7e42c65d073bee7f42ea7377cc9d5fc
Contents?: true
Size: 938 Bytes
Versions: 5
Compression:
Stored size: 938 Bytes
Contents
module Mongoid module Threaded module Lifecycle private # Execute a block in loading revision mode. # # @example Execute in loading revision mode. # _loading_revision do # load_revision # end # # @return [ Object ] The return value of the block. # # @since 2.3.4 def _loading_revision Threaded.begin_execution("load_revision") yield ensure Threaded.exit_execution("load_revision") end module ClassMethods # Is the current thread in loading revision mode? # # @example Is the current thread in loading revision mode? # proxy._loading_revision? # # @return [ true, false ] If the thread is loading a revision. # # @since 2.3.4 def _loading_revision? Threaded.executing?("load_revision") end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems