mirror of
https://github.com/lostisland/faraday.git
synced 2025-10-04 00:02:03 -04:00
always require 'monitor' since it's used by AdapterRegistry too.
This commit is contained in:
parent
e8382421aa
commit
dcb7030289
@ -1,5 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'monitor'
|
||||
|
||||
module Faraday
|
||||
# Adds the ability for other modules to register and lookup
|
||||
# middleware classes.
|
||||
@ -83,10 +85,7 @@ module Faraday
|
||||
end
|
||||
|
||||
def middleware_mutex(&block)
|
||||
@middleware_mutex ||= begin
|
||||
require 'monitor'
|
||||
Monitor.new
|
||||
end
|
||||
@middleware_mutex ||= Monitor.new
|
||||
@middleware_mutex.synchronize(&block)
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user