module Faraday::MiddlewareRegistry

def middleware_mutex(&block)

def middleware_mutex(&block)
  @middleware_mutex ||= Monitor.new
  @middleware_mutex.synchronize(&block)
end