module Concurrent::UsesGlobalThreadPool

def self.included(base)

def self.included(base)
  class << base
    def thread_pool
      @thread_pool || $GLOBAL_THREAD_POOL
    end
    def thread_pool=(pool)
      if pool == $GLOBAL_THREAD_POOL
        @thread_pool = nil
      else
        @thread_pool = pool
      end
    end
  end
end

def thread_pool

def thread_pool
  @thread_pool || $GLOBAL_THREAD_POOL
end

def thread_pool=(pool)

def thread_pool=(pool)
  if pool == $GLOBAL_THREAD_POOL
    @thread_pool = nil
  else
    @thread_pool = pool
  end
end