Skip to content

Commit

Permalink
[AutoLoad] does not take the lock to try to compile is an instance is…
Browse files Browse the repository at this point in the history
… already present
  • Loading branch information
myxoh committed Sep 5, 2019
1 parent 063af30 commit 35d6473
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/grape/api/instance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ def cascade(value = nil)
end

def compile!
return if instance
LOCK.synchronize { compile unless instance }
end

Expand Down

0 comments on commit 35d6473

Please sign in to comment.