method
isolation_level=
v7.1.3.2 -
Show latest stable
- Class:
ActiveSupport::IsolatedExecutionState
isolation_level=(level)public
No documentation available.
# File activesupport/lib/active_support/isolated_execution_state.rb, line 15
def isolation_level=(level)
return if level == @isolation_level
unless %(thread fiber).include?(level)
raise ArgumentError, "isolation_level must be `:thread` or `:fiber`, got: `#{level.inspect}`"
end
clear if @isolation_level
@scope =
case level
when :thread; Thread
when :fiber; Fiber
end
@isolation_level = level
end