Commit c4939aa9 authored by Alex Kalderimis's avatar Alex Kalderimis Committed by Alex Kalderimis

Add mutex, for thread-safety

parent 3be38384
......@@ -5,8 +5,16 @@ module EpicTreeSorting
include FromUnion
include RelativePositioning
IMPLEMENTATIONS_MUTEX = Mutex.new
def self.implementations
@impls ||= [].to_set
unless defined?(@impls)
IMPLEMENTATIONS_MUTEX.synchronize do
@impls ||= Set.new
end
end
@impls
end
class_methods do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment