You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: utils.rb
    path of file: ./repos/gitlabhq/gems/gitlab-utils/lib/gitlab
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require "addressable/uri"
require "active_support/all"
require "action_view"

module Gitlab
  module Utils
    extend self
    DoubleEncod
    
    def restrict_within_concurrent_ruby
      previous = Thread.current[:restrict_within_concurrent_ruby]
      Thread.current[:restrict_within_concurrent_ruby] = true

      yield
    ensure
      Thread.current[:restrict_within_concurrent_ruby] = previous
    end